简体   繁体   中英

Dealing with 32-bit code on Snow Leopard 64-bit?

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM