When I compile my code, I get a linking error
Code: Select all
[ 13%] Linking CXX shared library libbaseRobot.dylib
Undefined symbols for architecture x86_64:
"_gsl_ran_levy", referenced from:
BaseRobot::DoLevyWalk() in baseRobot.cpp.o
"_gsl_rng_alloc", referenced from:
BaseRobot::Init(ticpp::Element&) in baseRobot.cpp.o
"_gsl_rng_default", referenced from:
BaseRobot::Init(ticpp::Element&) in baseRobot.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [controllers/libbaseRobot.dylib] Error 1
make[1]: *** [controllers/CMakeFiles/baseRobot.dir/all] Error 2
make: *** [all] Error 2
In the CMakeLists.txt of my project, I tried:
Code: Select all
# Set ARGoS link dir
link_directories(${ARGOS_LIBRARY_DIRS} /usr/local/Cellar/gsl/1.16/lib/)
Another weird thing is that after running cmake, the file build/CMakeCache.txt has:
Code: Select all
CMAKE_EXE_LINKER_FLAGS:STRING= -L/opt/local/lib