在 Codelite 中使用 Boost 二进制库
Use Boost Library Binary in Codelite
我是 boost 的新手,想将它与 Codelite 一起使用。
我在这里遵循了这个指南:Official Boost Guide
第 1 步)我将其安装到 /usr/local/boost_1_67_0/
第 4 步)我可以编译示例并且它按预期工作
第 5 步)我只是 运行 ./bootstrap.sh
并安装了所有东西。
它成功了告诉我
>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
这就是我在 codelite 中所做的:
6) 该示例使用 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
现在如果我执行程序,我得到:
./FeynCalc--: error while loading shared libraries: libboost_regex.so.1.67.0: cannot open shared object file: No such file or directory
我输入了 /usr/local/boost_1_67_0/stage/lib,所有需要的文件都在那里。我不知道还能做什么。
解决问题的方法是
正在 /etc/ld.so.conf.d/
中创建新文件
我把它命名为boost.conf
我进入了
# boost_1_67_0 default configuration
/usr/local/boost_1_67_0/stage/lib
然后我在终端运行 ldconfig。
我是 boost 的新手,想将它与 Codelite 一起使用。
我在这里遵循了这个指南:Official Boost Guide
第 1 步)我将其安装到 /usr/local/boost_1_67_0/
第 4 步)我可以编译示例并且它按预期工作
第 5 步)我只是 运行 ./bootstrap.sh
并安装了所有东西。
它成功了告诉我
>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
这就是我在 codelite 中所做的:
6) 该示例使用 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
现在如果我执行程序,我得到:
./FeynCalc--: error while loading shared libraries: libboost_regex.so.1.67.0: cannot open shared object file: No such file or directory
我输入了 /usr/local/boost_1_67_0/stage/lib,所有需要的文件都在那里。我不知道还能做什么。
解决问题的方法是
正在 /etc/ld.so.conf.d/
中创建新文件
我把它命名为boost.conf
我进入了
# boost_1_67_0 default configuration
/usr/local/boost_1_67_0/stage/lib
然后我在终端运行 ldconfig。