I need to build a library (Ipopt) on Mac OS X and use it from two different programs (Python & Matlab). However, one program is 32-bit and the other is 64-bit. Do I have to build two separate libraries of the two architectures then set the path accordingly for each program? Or can I build both architectures in the same library file(s) and the program will select the correct architecture to load? If I can, then how?
Thanks!
You can build both architectures and combine them into a single binary. The tool to do this is
lipo.For example, if you had built libpopt as a 32 bit library and placed it in
lib/, and built it again as a 64 bit library and placed that inlib64/, then the command to combine these two could be:For more information, see the lipo man page (here, or through
man lipo).