I'm not exactly sure why, but removing the link to libarmadillo.dylib
in the "Link Binary with Libraries" section has solved the problem and the program now compiles!
Linker error, Xcode 5 and Armadillo: "library not found for -larmadillo.4.0.2"
Question
I'm trying to install and compile a small example program using the Armadillo framework, unfortunately I'm getting linker errors. Here are my steps so far:
- Installed Armadillo
- Edited config.hpp to remove the constant definition of
ARMA_USE_WRAPPER
- Added the accelerate framework to the Xcode project
- Added
/usr/include/
to header search paths - Added
/usr/lib/
to library search paths - Added
libarmadillo.dylib
to the "Link Binary with Libraries" section - modified include statements to
#include "/usr/include/armadillo"
Specifically, the linker error I get in Xcode 5 is as follows:
> ld: library not found for -larmadillo.4.0.2 clang: error: linker
> command failed with exit code 1 (use -v to see invocation)
Does anybody have any clues as to what I'm missing/doing wrong? I've tried the solutions posted in similar questions with no success, thanks in advance!
edit: interestingly, compiling and running the example programs in Terminal functions correctly!
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow