我有一些遗留的 'so'
文件,带有相应的 header
,如何从中生成 'a'
文件
与项目联系起来?
(或者我可以链接到 'so'
- 添加 -L/path_to_so/
和 -lsomething
(假设 so 在/path_to_so 中并且被命名为 libsomething.so 似乎不起作用 - ld 提示缺少导出 - 但它们存在于 lib 中(lib 是 32 位,使用了 -m32,项目是 32 位)?)
我不是 linux 大师,在 Windows 上,当我有 dll
和 header
时,我能够生成 lib,我正在与要使用的项目链接dll - 我假设在 linux 上也是如此?
最佳答案
I have some legacy 'so' file, with the corresponding header, how to make 'a' file out of it to link with the project ?
没有办法制作.a
。来自 .so
。在 Linux 上 .so
直接链接,不需要导入库。
关于linux - 使.a对应.so,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22399490/