6

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?

Sam Miller
  • 23,808
  • 4
  • 67
  • 87
Ramy Al Zuhouri
  • 21,580
  • 26
  • 105
  • 187

1 Answers1

9

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
Wolfer
  • 891
  • 2
  • 12
  • 21
  • if 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. – Akil Demir Jun 10 '20 at 07:53