Linking boost libraries
23,367
Or for those who are looking for a quick answer (and are on linux), the magic is simply to add the following flags:
-l boost_system
Author by
Ramy Al Zuhouri
iOS Developer in Haarlem - Noord Holland Netherlands
Updated on December 11, 2020Comments
-
Ramy Al Zuhouri over 3 years
I have downloaded the boost library (version 1.46.1), but I don't know how to link it through xcode.I found an old question says to put the -lfftw3 flag, so I've put it.
I also added the path: /home/Documents/C++/boost_1_46_1 (it's the directory where I have put the library), but I am getting an error from the linker:ld: warning: directory not found for option '-L/home/ramy/Documents/C++/boost_1_46_1' ld: library not found for -lfftw3 clang: error: linker command failed with exit code 1 (use -v to see invocation) Command /Developer/usr/bin/clang++ failed with exit code 1
So the question are two:
1)How to manage xcode to link boost?
2)Where to put the library in file system? In linux there was /usr/lib, here there isn't this path, should I put it in /Developer/usr/lib? -
Akil Demir almost 4 yearsif I want to link only 1 particular boost lib(e.g asio) how can I do that? I'm running on very limited virtual environment so resources limited.