将 32 位库链接到 64 位程序 [英] Linking 32-bit library to 64-bit program

查看:33
本文介绍了将 32 位库链接到 64 位程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 32 位的 .so 二进制库,我必须生成使用它的 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 位代码.

No. You can't directly link to 32bit code inside of a 64bit program.

最好的选择是编译一个 32 位(独立)程序,它可以在您的 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆