在 Snow Leopard 64 位上处理 32 位代码?

发布于 2024-08-18 05:31:32 字数 462 浏览 3 评论 0原文

我想为我正在构建的 XULRunner 应用程序创建一个 XPCOM 插件。由于 Mozilla 仅提供 XULRunner SDK 的 32 位版本,因此我必须链接 32 位库。这意味着很多库需要我自己构建。

与此相关,我有几个问题:

我可以为 32 位构建执行 sudo make install 吗?或者它会弄乱我的系统吗?
如果我做不到,那么解决方法是什么?
我当前的解决方案是在配置命令中包含 lib 目录:

CFLAGS=" -arch i386" CCFLAGS=" -arch i386" CXXFLAGS=" -arch i386" LDFLAGS=" -L`pwd`/../libs/gst-plugins-base -L`pwd`/../libs/liboil -arch i386" ./configure

这是要走的路还是更好的选择?

I would like to create an XPCOM plugin for a XULRunner application that I'm building. Since Mozilla only provides a 32-bit build of the XULRunner SDK I have to link with 32-bit libraries. This means that a lot of libraries need to be built by me.

Relating this I have a few questions:

Can I do a sudo make install for a 32-bit build? Or will it mess up my system?
If I can't do it, then what is the workaround?
My current solution is including the lib dir in the configure command:

CFLAGS=" -arch i386" CCFLAGS=" -arch i386" CXXFLAGS=" -arch i386" LDFLAGS=" -L`pwd`/../libs/gst-plugins-base -L`pwd`/../libs/liboil -arch i386" ./configure

Is this the way to go or are the better alternatives?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

用心笑 2024-08-25 05:31:32

如果安装位置不与系统库冲突,sudo make install 就可以了。为了让构建的二进制文件找到您的库,otoolinstall_name_tool 是您的朋友。对于部署,这些将允许您使所有内容都与捆绑包相关,即使它是为不同的安装位置构建的。

sudo make install will be fine, IF the installation location does not conflict with the system libraries. In order to allow the built binaries to find your libraries, otool and install_name_tool are your friends. For deployment, these will allow you to make everything bundle-relative even if it has been built for a different install location.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文