Shared Library Search Paths
在使用CodeLite编译动态库的时候,可以通过在Linker > Linker Options中添加:
-install_name @executable_path/libXXX.so
的方式更改动态库的Install Name。
在控制台中输入man ld之后, 会显示ld的帮助信息。其中包含-install_name参数的详细描述:
-install_name name
Sets an internal "install path" (LC_ID_DYLIB) in a dynamic library. Any clients linked against the library will
record that path as the way dyld should locate this library. If this option is not specified, then the -o path
will be used. This option is also called -dylib_install_name for compatibility.
在类Unix系统下,动态库的名字应该以“lib”开头。在应用程序链接阶段,如果想链接一个动态库,需以去掉“lib”和扩展名后的库名来进行链接。比如,如果要链接一个名为libXXX.so的动态库,需要通过设置-lXXX来进行链接。
参考
https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/RunpathDependentLibraries.html
http://www.eyrie.org/~eagle/notes/rpath.html
http://thecourtsofchaos.com/2013/09/16/how-to-copy-and-relink-binaries-on-osx/
http://osiris.laya.com/coding/dylib_linking.html
https://www.mikeash.com/pyblog/friday-qa-2009-11-06-linking-and-install-names.html
Shared Library Search Paths的更多相关文章
- $(inherited) "$(SRCROOT) 修改.a文件的路径 --Library Search Paths
$(inherited) "$(SRCROOT)/.a文件所在的文件名" //如果有多个.a文件格式就像这样 $(inherited) "$(SRCROOT)/xxxx& ...
- Linux Programe/Dynamic Shared Library Entry/Exit Point && Glibc Entry Point/Function
目录 . 引言 . C/C++运行库 . 静态Glibc && 可执行文件 入口/终止函数 . 动态Glibc && 可执行文件 入口/终止函数 . 静态Glibc & ...
- eclipse报错:Failed to load the JNI shared library
Eclipse运行时提示“Failed to load the JNI shared library /Java/jre6/bin/client/jvm.dll”的一个解决方案 因为 Eclipse ...
- Eclipse - Failed to load the JNI shared Library (JDK)
When I try opening Eclipse, a pop-up dialog states: Failed to load the JNI shared library "C:/J ...
- 启动Eclipse 弹出"Failed to load the JNI shared library jvm.dll"错误
启动Eclipse 弹出"Failed to load the JNI shared library jvm.dll"错误,如下 原因:eclipse的版本与jre或者jdk版本不 ...
- dynamic-link library shared library of functions and resources
https://msdn.microsoft.com/en-us/library/1ez7dh12.aspx A dynamic-link library (DLL) is an executable ...
- Eclipse:启动时提示"Failed to load the JNI shared library"的解决方案
今天打开Eclipse,弹出提示框"Failed to load the JNI shared library" 原因1:给定目录下jvm.dll不存在. 对策:(1)重新安装jr ...
- 64位操作系统弹出"Failed to load the JNI shared library “E:/2000/Java/JDK6/bin/..jre/bin/client/jvm.dll”
64位操作系统弹出"Failed to load the JNI shared library /..jre/bin/client/jvm.dll”,最大的可能就是jdk的版本问题.去你的C ...
- Eclipse之Failed to load the JNI shared library”……\jvm.dll”的解决方案
问题描述:java环境变量配置完全正确,但是运行eclipse时提示:Failed to load the JNI shared library " xxx\jva.dll" 原因 ...
随机推荐
- 分布式搜索引擎Elasticsearch PHP类封装 使用原生api
//官方的 php api写的鸡肋了,下面这个类可以使用 es api 操作. <?php class ElasticSearch { public $index; function __co ...
- [转]JS中对象与字符串的互相转换
原文地址:http://www.cnblogs.com/luminji/p/3617160.html 在使用 JSON2.JS 文件的 JSON.parse(data) 方法时候,碰到了问题: thr ...
- easyui-datagrid 的loader属性用法
API介绍比较简略: 定义如何从远程服务器加载数据.返回false可以放弃本次请求动作.该函数接受以下参数:param:参数对象传递给远程服务器.success(data):当检索数据成功的时候会调用 ...
- iOS不得姐项目--TabBar的重复点击实现当前模块刷新;状态栏点击实现当前模块回滚到最顶部
一.实现功能:重复点击tabBar,刷新当前TableView,其余不受影响 <1>实现思路: 错误的方法: TabBar成为自己的代理,监听自己的点击--这种方法是不可取的,如果外面设置 ...
- 浅析jQuery(function(){})与(function(){})(jQuery)之间的区别
本篇文章主要是对jQuery(function(){})与(function(){})(jQuery)之间的区别进行了介绍,需要的朋友可以过来参考下,希望对大家有所帮助 Jquery是优秀的Javas ...
- 【USACO 1.2】Name That Number
给你一串数字(≤12个),每个数字可以对应3个字母,求生成的所有字符串里,在字典内的有哪些. 我做的时候想的是字典树(Trie 树),模拟数串生成的所有字符串,然后在字典树里查找一下. /* TASK ...
- block的使用
转载自:http://mobile.51cto.com/hot-403897.htm 一.概述 Block是C级别的语法和运行时特性.Block比较类似C函数,但是Block比之C函数,其灵活性体现在 ...
- SVN中(trunk tags branches)的使用理解
trunk--主干(永远都是最新的,每发布一个版本会在tags和branches上进行分支) tags-标签(只读,用于存放发布后的文件冻结,以及对应发布后版本的源文件:可以是来自主干或者分支的发布: ...
- Bmob开发指南【android端】
作为一个开发者,数据的存储,用户的登陆,验证等操作,对程序来说是必不可少的,下面我们将从Bmob的基本信息开始讲起: [Bmob] 官网: http://www.bmob.cn/ 帮助文档:htt ...
- 关于python
1.from foo import bar 从foo中import bar,如果bar是一个数组,那么接下来你就可以在你当前程序中直接使用名为bar的这个数组. 2.import bar as foo ...