Building libFLAC on OSX with i386 arch not x86_64

限于喜欢 提交于 2020-01-03 18:34:48

问题


I'm trying to build libFLAC to use in a project of mine, however when it comes to linking, GCC ignores the library because it says it was not built for the current architecture (i386). When I compile the program in 64-bit, it links the library properly which means the library was compiled for x86_64 architecture. Unfortunately, my program wont work in 64-bit, so I need to compile libFLAC as i386. I've tried using ./configure --build=i386 however it didn't seem to change anything.

So far, I've simply been doing this:
./configure --disable-asm-optimizations --build=i386
make
sudo make install

But it always seems to build for x86_64.

Does anyone know how I can force it to compile for a certain architecture?


回答1:


Verbatim from my comment:

Try ./configure CFLAGS='-arch i386'. You might need other CFLAGS as well, but give it a try.



来源:https://stackoverflow.com/questions/7342099/building-libflac-on-osx-with-i386-arch-not-x86-64

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!