无法找到boost库 [英] Cannot find boost library
问题描述
这是一个非常基本的问题,我只职位,因为我已经花了一些时间进去。这是我迄今所做的:
-
下载并编译Boost库:
须藤./bootstrap.sh
和须藤./bjam安装
此方式,它被安装到
的/ usr / local / lib目录
。 -
在我的源$ C $ C,我只说:
的#include<升压/ asio.hpp>
使用boost ::支持ASIO ::知识产权:: TCP
块引用> -
我编译:
G ++ -I / usr / lib目录/ JVM / JAVA-6的OpenJDK / -L包括在/ usr / local / lib目录-fPIC -shared -lboost_system -o libagent.so agent.cpp
-
然而,
LDD -d ./libagent.so
给我:libboost_system.so.1.46.1 =>没有找到
-
但没有抛出的错误,当使用
-lboost_system
和LS的/ usr / local / lib目录
让我除其他事项:libboost_system.so
结果libboost_system.a
我是什么失踪?
做了 ./的bjam安装
工具还运行 ldconfig的(8)
工具? ldconfig的(8)
后需要新库安装更新由 ld.so(8)
在程序的执行时间。
This is a very basic question, I only post because I've spent already some time into it. This is what I've done so far:
Downloaded and compiled the boost library:
sudo ./bootstrap.sh
andsudo ./bjam install
This way it was installed into
/usr/local/lib
.In my source code I've added only:
#include <boost/asio.hpp> using boost::asio::ip::tcp
I compile it with:
g++ -I/usr/lib/jvm/java-6-openjdk/include -L/usr/local/lib -fPIC -lboost_system -shared -o libagent.so agent.cpp
However,
ldd -d ./libagent.so
gives me:libboost_system.so.1.46.1 => not found
But there is no error thrown, when using the
-lboost_system
andls /usr/local/lib
gets me among other things:libboost_system.so
libboost_system.a
What am I missing?
Did the ./bjam install
tool also run the ldconfig(8)
tool? ldconfig(8)
needs to be run after new libraries are installed to update the caches used by ld.so(8)
at program execution time.
这篇关于无法找到boost库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!