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...