How to compile universal libraries on Mac OS X?

前端 未结 3 1360
暗喜
暗喜 2020-12-25 15:22

This may be a very silly question, but I\'m new to developing on Macs and am having a hard time with the universal binaries.

I\'ve got an application that I\'m compi

3条回答
  •  遥遥无期
    2020-12-25 15:55

    Finally got it working.

    In order to control the architecture of the target, I manually went in and edited the Makefiles.

    For one of them, I added to the end of the line that starts with CFLAGS: -arch i386 -arch x86_64 -arch ppc This produced a universal binary.

    For the other, when I did the same thing, the compile would error out. I had to cycle through and only put one arch at a time, and then after I produced all three, I called lipo on them with the -create flag to create a universal binary.

提交回复
热议问题