certi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [certi-dev] Problem building CERTI on Mac OS X


From: Mark Brown
Subject: Re: [certi-dev] Problem building CERTI on Mac OS X
Date: Thu, 28 Apr 2011 14:13:32 +0900
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; en-GB; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9

It still doesn't quite work - I commented out the lines

IF (NOT WIN32)
...
#FIND_LIBRARY(RT_LIBRARY rt)
#SET(CMAKE_REQUIRES_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${RT_LIBRARY})

and tried again but it still fails to link (library not found for -lrt) so I'm not sure where it's trying to pick that up from. However, I don't think I need the test program.

Cheers,
Mark.


On 4/27/11 4:15 PM, Eric Noulard wrote:
2011/4/27 Mark Brown<address@hidden>:
Thanks for investigating Eric.

I tried the "-undefined suppress" and the linker complains:

ld: can't use -undefined warning or suppress with -twolevel_namespace

I then tried with the "-flat_namespace -undefined suppress" flags. That
seems to fix the original problem (insofar that it now links, at least)!

However, it then fails linking the test program:

Scanning dependencies of target CertiProcessus_A
[ 98%] Building CXX object
test/utility/CMakeFiles/CertiProcessus_A.dir/Main_SocketSHM.o
Linking CXX executable CertiProcessus_A
ld: library not found for -lrt
collect2: ld returned 1 exit status
make[2]: *** [test/utility/CertiProcessus_A] Error 1
make[1]: *** [test/utility/CMakeFiles/CertiProcessus_A.dir/all] Error 2
make: *** [all] Error 2

Yes ok, lib "rt" is not available on MacOS.
You could try to edit the certi/test/utility/CMakeLists.txt and replace

IF(WIN32)
     TARGET_LINK_LIBRARIES(CertiProcessus_B CERTI HLA)
ELSE(WIN32)
     TARGET_LINK_LIBRARIES(CertiProcessus_B CERTI HLA rt)
ENDIF(WIN32)

with something like

TARGET_LINK_LIBRARIES(CertiProcessus_B CERTI HLA)

IF (NOT APPLE)
     TARGET_LINK_LIBRARIES(CertiProcessus_B rt)
ENDIF(NOT APPLE)

If it works I'll try a better fix using something like

find_library(RT_LIBRARY rt) etc...



--
Mark A. Brown
Chief Researcher
Air Traffic Management Department
Electronic Navigation Research Institute
7-42-23 Jindaijihigashi-machi, Chofu, Tokyo 182-0012

*****************************************
電子航法研究所
〒182-0012
東京都調布市深大寺東町7丁目42番地23
航空交通管理領域 主幹研究員 マーク・ブラウン
電話:0422−41−3325
FAX:0422−70−8952
*****************************************



reply via email to

[Prev in Thread] Current Thread [Next in Thread]