Search code examples
c++boostcodelite

Use Boost Library Binary in Codelite


I'm new to boost and want to use it with Codelite.

I followed this guide here: Official Boost Guide

Step 1) I installed it to /usr/local/boost_1_67_0/

Step 4) I can compile the example and it works as expected

Step 5) I just ran ./bootstrap.sh and installed everything. It succeeded and told me

>The Boost C++ Libraries were successfully built!
>
>The following directory should be added to compiler include paths:
>
>/usr/local/boost_1_67_0
>
>The following directory should be added to linker library paths:
>
>/usr/local/boost_1_67_0/stage/lib

So this is what I did in codelite: Codelite Compiler Settings

Codelite Linker Settings

6) The example compiles errorlessly with codelite.

>g++  -c  "~/Dropbox/MasterThesis/C++/DiracTraceEvaluator/FeynCalc--/main.cpp" -g -O0 -Wall --std=c++11  -o ./Debug/main.cpp.o -I. -I. -I/usr/local/boost_1_67_0/
g++ -o ./Debug/FeynCalc-- @"FeynCalc--.txt" -L. -L./ -L/usr/local/boost_1_67_0/ -L/usr/local/boost_1_67_0/stage/lib/  -lboost_program_options -lboost_regex

Now if I execute the program, I get:

./FeynCalc--: error while loading shared libraries: libboost_regex.so.1.67.0: cannot open shared object file: No such file or directory

I entered /usr/local/boost_1_67_0/stage/lib and all the required files are there. I don't know what else to do.


Solution

  • What solve the issue was

    creating a new file in /etc/ld.so.conf.d/
    I named it boost.conf

    There I entered

    # boost_1_67_0 default configuration
    /usr/local/boost_1_67_0/stage/lib
    

    Then I ran ldconfig in terminal.