开发者

Building libFLAC on OSX with i386 arch not x86_64

开发者 https://www.devze.com 2023-04-03 04:26 出处:网络
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

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 li开发者_运维问答nks 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?


Verbatim from my comment:

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

0

精彩评论

暂无评论...
验证码 换一张
取 消