How to Use Boost Headers with Jetbrains Appcode

I have Boost libraries installed on my Macbook through MacPorts, and I was wondering how to configure AppCode for header recognition. I tried right-clicking on the project -> Add Frameworks and Libraries -> Other... -> go to /opt/local/include -> Choose , but this does not seem to add Boost to the list.

Has anyone successfully got Boost to work with AppCode?

+4
source share
1 answer

If anyone else stumbles upon this via google:

There are three steps:

  • Right-click on the project and select Add Frameworks and Libraries , then Other and select all dylib types. Since I installed boost via brew, dylib were located under /usr/local/Cellar/boost/1.53.0/lib/ . Make sure you select all of them, so that in the new Frameworks folder in your navigation window, a list of all the enhancement libraries appears.

    boost libs included

  • Right-click the project and select Project Settings . Scroll to Search Paths and add the path to your boost include directory in the Header Search Paths . For me, it was under /usr/local/Cellar/boost/1.53.0/include . Make sure Recursive is not checked, or you will get compilation errors if you use std !!!

  • Continue to add the lib dir extension (which you looked at in step 1) in the Library Search Paths section. After steps 2 and 3, your search paths might look something like this:

    search paths

Here it is! You are now ready to use formatting headers as follows:

 #include <boost/lexical_cast.hpp> 

Just make sure you build in 64-bit mode, as this is what the acceleration libraries are compiled as (may differ for macports build).

+10
source

Source: https://habr.com/ru/post/1494513/


All Articles