本文介绍了无法找到boost库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个非常基本的问题,我只职位,因为我已经花了一些时间进去。这是我迄今所做的:


  1. 下载并编译Boost库:

    须藤./bootstrap.sh 须藤./bjam安装

    此方式,它被安装到的/ usr / local / lib目录


  2. 在我的源$ C ​​$ C,我只说:

  3. 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

  4. However, ldd -d ./libagent.so gives me:

    libboost_system.so.1.46.1 => not found

  5. But there is no error thrown, when using the -lboost_system and ls /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库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 00:28