链接32位库64位程序 [英] Linking 32-bit library to 64-bit program
问题描述
我有一个32位的。所以只有二进制文件的库,我要生成一个使用它的64位程序。 有没有一种方法来包装或将其转换,因此它可与64位程序中使用?
I have a 32-bit .so binary-only library and I have to generate 64-bit program that uses it. Is there a way to wrap or convert it, so it can be used with 64-bit program?
推荐答案
没有。 64位程序里面不能直接链接到32位code。
No. You can't directly link to 32bit code inside of a 64bit program.
最好的办法是编译32位(独立的)程序,可以<一href="http://www.debian-administration.org/article/Running%5F32-bit%5FApplications%5Fon%5F64-bit%5FDebian%5FGNU/Linux">run您的64位平台上(使用IA32),然后使用进程间通信的一种形式,从您的64位程序传达给它。
The best option is to compile a 32bit (standalone) program that can run on your 64bit platform (using ia32), and then use a form of inter-process communication to communicate to it from your 64bit program.
这篇关于链接32位库64位程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!