我可以创建一个既有共享库又有静态库的共享库吗
我正在尝试创建一个共享库,该库在内部链接到许多共享库和静态库。就我而言,我的共享库不包括 static lib 。我想知道我正在尝试的内容是否正确,或者我需要将静态库转换为共享库,然后进行链接。
我需要知道是否有任何 makefile 标志允许我添加静态库和共享 lib 。
请建议。
I am tryng to create a shared library which internally is linking to many shared lib and a static lib . In my case my shared lib is not including static lib . I want to know what i am trying whether it is correct or i need to convert static lib to shared lib and then do the linking .
I need to know that is there any makefile flag which allow me to add static library along with shared lib .
Please suggest .
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以创建一个依赖于其他库(静态和动态)的库。但是您需要将静态库部分集成到您的编辑中(因为这个无法动态加载)
:这里可能是您正在寻找的将静态库转换为共享库(适用于Linux,但对于操作系统也有相同的效果):
You can create a library which is dependent of other library (static and dynamic). But you need to integrate the static library part inside your (because this one can not be load dynamically)
edit: here may what you are looking for convert static library to shared library (it is for linux, but you will have the same for os):