最近把cpp代码从开发机放到eclipse时,遇到了不少路径问题。
安装boost的时候,其实很简单
wget http://sourceforge.net/projects/boost/files/boost/1.54.0/boost_1_54_0.tar.gz
tar -xzvf boost_1_54_0.tar.gz
cd boost_1_54_0
./bootstrap.sh --prefix=/usr/local
./b2 install --with=all
boost库被安装在/usr/local/lib下面
编译时
g++ syslogem.cpp -lboost_system
出现
undefined reference to `boost::system::generic_category()'
 undefined reference to `boost::system::generic_category()'
undefined reference to `boost::system::system_category()'
只好添加路径
g++ syslogem.cpp -L/usr/local/lib -lboost_system

运行的时候
LD_LIBRARY_PATH=/usr/local/lib
./a.out
出现
error while loading shared libraries: libboost_system.so.1.54.0: cannot open shared object file: No such file or directory
手动链接
ln -s /usr/local/lib/libboost_system.so.1.54.0 /lib64

boost的libboost_system问题的更多相关文章

  1. ubuntu14.04 boost动态库找不到 libboost_system.so.1.58.0

    error while loading shared libraries: : cannot open shared object file: No such file or directory == ...

  2. Linux下编译使用boost库:

    Boost是什么不多说, 下面说说怎样在Linux下编译使用Boost的所有模块. 1. 先去Boost官网下载最新的Boost版本, 我下载的是boost_1_56_0版本, 解压. 2. 进入解压 ...

  3. boost静态链接的问题 -lgcc_s

    在使用gcc/g++ 编译程序时我们希望指向一些库是使用静态的链接方式. 另外的一些是动态的方式. 我以boost 为例. 如果我们要使用静态库则是这样的: # g++ main.cpp -lpthr ...

  4. 树莓PI交叉编译BOOST库(asio网络例子)

    环境搭建参考上一篇文章[http://www.cnblogs.com/yuliyang/p/4023758.html] 客户端(use boost.asio on raspberry pi )clie ...

  5. Mac上安装boost开放环境

    方法一: 去Macports官网的下载页面(https://distfiles.macports.org/MacPorts/)下载对用Mac系统的pkg文件,下载完成之后,双击,一路[下一步],到安装 ...

  6. Linux平台的boost安装全解

    @import url(http://i.cnblogs.com/Load.ashx?type=style&file=SyntaxHighlighter.css); @import url(/ ...

  7. Centos 安装boost库

    1.在http://www.boost.org/下载boost安装包boost_1_65_1.tar.gz 2.在Centos上解压tar -zxvf  boost_1_65_1.tar.gz后,cd ...

  8. c/c++ 多线程 ubuntu18.04 boost编译与运行的坑

    多线程 boost编译与运行的坑 背景:因为要使用boost里的多线程库,所以遇到了下面的坑. 系统版本:ubuntu18.04 一,安装boost 1,去boost官网下载 boost_1_XX_0 ...

  9. ubuntu 16.04 下更换boost版本

    如果是新机器,没装过boost,那么直接一条命令 sudo apt-get install libboost-all-dev 头文件一般安装在 /usr/include 下面有一个目录boost,里面 ...

随机推荐

  1. Linux-date函数

    rhel7 date函数 显示本地时间?设定当前系统的时间,以一定格式显示当前时间,如X-X-X /X:X:X 使用man date命令查看关于date的使用方法 SYNOPSIS           ...

  2. PAT Advanced 1001 A+B Format (20 分)

    Calculate a+b and output the sum in standard format -- that is, the digits must be separated into gr ...

  3. Manacher || Luogu P3805【模板】manacher算法

    题面:[模板]manacher算法 代码: #include<cstdio> #include<cstring> #include<iostream> #defin ...

  4. php内置函数分析array_diff()

    PHP_FUNCTION(array_diff) { zval *args; int argc, i; uint32_t num; HashTable exclude; zval *value; ze ...

  5. 微信 PHP - SDK 包

    下载 个人公众号谢谢各位老铁支持

  6. element隐藏组件滚动条scrollbar使用

    可使用 组件 <el-scrollbar></el-scrollbar> 设置 组件的样式 为 高度100% <el-scrollbar style="heig ...

  7. Flask【第5篇】:用Falsk实现的分页

    用flask实现的分页 一.flask实现的分页组件 from urllib.parse import urlencode,quote,unquote class Pagination(object) ...

  8. web页面调用app的方法

    use_app_goto_page: (skip_type, skip_target) => { // Android App if (/android/i.test(navigator.use ...

  9. Python---面向对象---案例

    a = 5print(5/10)# 地板除(功能类似于数学模块当中floor()向下取整操作)print(5//10)print(a%10)b = 25print(b/10)print(b//10)p ...

  10. 封装storage

    export const local = { getItem(key) { let value = localStorage.getItem(key) if (/^\{.*\}$/.test(valu ...