gcc中的-Wl,rpath=<your_lib_dir>选项
来源:互联网 发布:程序员 app 编辑:程序博客网 时间:2024/05/22 10:57
转自: http://www.cnblogs.com/bourneli/archive/2012/04/27/2474103.html
gcc编译链接动态库时,很有可能编译通过,但是执行时,找不到动态链接库,那是
因为-L选项指定的路径只在编译时有效,编译出来的可执行文件不知道-L选项后面的值,
当然找不到。可以用ldd <your_execute>看看是不有 ‘not found’在你链接的库后面,
解决方法是通过-Wl,rpath=<your_lib_dir>,使得execute记住链接库的位置
参考链接
http://gcc.gnu.org/ml/gcc-help/2005-12/msg00017.html
阅读全文
0 0
- gcc中的-Wl,rpath=<your_lib_dir>选项
- gcc中的-Wl,rpath=<your_lib_dir>选项
- gcc中的-Wl,rpath=<your_lib_dir>选项
- gcc中的-Wl,rpath=<your_lib_dir>选项
- gcc中的-Wl,rpath=<your_lib_dir>选项
- g++的编译选项:-Wl,-rpath=
- GCC的-wl,-rpath=<link_path>参数
- gcc编译选项-Wl
- 链接选项-I,-l,-L,-Wl:rpath
- gcc -rpath选项
- GCC选项_-Wl,-soname
- GCC选项_-Wl,-soname
- GCC选项_-Wl,-soname
- GCC选项_-Wl,-soname
- GCC选项_-Wl,-soname
- GCC选项_-Wl,-soname
- GCC选项_-Wl,-soname
- GCC选项_-Wl,-soname
- 指针、空指针、指针值、void*指针
- 在服务器运行过程中的nginx重启、启动、关闭
- put 创建索引
- python安装LightGBM
- Trafodion 单表迁移
- gcc中的-Wl,rpath=<your_lib_dir>选项
- Java的比较接口 Comparable与Comparator
- C#动态执行函数:利用反射实现
- IORESOURCE_X 对应含义
- [HDU-5979] [Problem I]水题(16大连站)计算几何
- 学写个Python爬虫都被这世界针对
- 设计模式-抽象工厂模式
- iOS 之 UIControl 的 Block 响应方式
- How to use IO BAR in linux PCIe device driver