Search code examples
c++xcodeboostmacportsosx-elcapitan

how to link boost with Xcode


I've upgraded my OS to El Capitan. I've used Macports to install Boost. All tutorials I've seen use this folder /usr/local/include to include the header files. In my case, I can't see this folder listed in my system unless this folder is hidden. I have no idea where the libraries installed via macports. Any suggestions?


Solution

  • Macports usually installs in /opt/local. Click on the project (1) and Build Settings (2) and point to headers with /opt/local/include (3).

    enter image description here

    And if you need to link to a library add /opt/local/lib and add required libraries via Build Phases.

    enter image description here