简体   繁体   English

无法使用boost在eclipse中找到libboost_system.so.1.43.0

[英]Cant find libboost_system.so.1.43.0 in eclipse using boost

I am trying to run boost in eclipse, 我正试图增加日食,

under Library search path I have put: /home/etobkru/boost_1_43_0/boostBinaries/lib/ and under Libraries I have put all the libs, boost_system, etc. 在我已放置的库搜索路径下:/ home / etobkru / boost_1_43_0 / boostBinaries / lib /,在库下放置了所有库,boost_system等。

The build is working without errors but when am trying to run the program I get an error: 构建工作正常,没有错误,但是在尝试运行程序时出现错误:

error while loading shared libraries: libboost_system.so.1.43.0: cannot open shared object file: No such file or directory 加载共享库时出错:libboost_system.so.1.43.0:无法打开共享库文件:没有这样的文件或目录

This file is under /home/etobkru/boost_1_43_0/boostBinaries/lib/ but I dont know how to make eclipse search in that directory. 该文件位于/ home / etobkru / boost_1_43_0 / boostBinaries / lib /下,但我不知道如何在该目录中进行日食搜索。

You didn't say what OS you're running. 您没有说您正在运行什么操作系统。 But as root, try: 但作为根,请尝试:

echo '/home/etobkru/boost_1_43_0/boostBinaries/lib/' >> /etc/ld.so.conf.d/etobkru_boost.conf
ldconfig -v 

EDIT: If you don't have root, you can try: 编辑:如果您没有root,可以尝试:

LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/etobkru/boost_1_43_0/boostBinaries/lib/" my_command

LD_LIBRARY_PATH is a colon-separated list of extra directories. LD_LIBRARY_PATH是用冒号分隔的其他目录列表。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM