如何在 Mac OSX 10.4 中以通用二进制文件编译 LibJpeg
我想在通用二进制文件(ppc,i386)中编译jpeg-8b。 10.4及更高版本的操作系统应该支持它。我可以在 10.5 和 10.6 中执行此操作,但二进制文件与 10.4 不兼容。因此我尝试在10.4中编译它,但失败了。
这是我的代码
cd jpeg-8b
sudo ./configure CC="gcc -arch i386 -arch ppc" CXX="g++ -arch i386 -arch ppc" CPP="gcc -E" CXXCPP="g++ -E" -enable-static=yes -enable-shared=no
,它失败并出现错误 configure: error: C compiler cannot createexecutables
如何在 MacOS 10.4 中编译 jpeg-8b?
I want to compile jpeg-8b in universal binary (ppc,i386). It should be supported in 10.4 and later OSs. I could do it in 10.5 and 10.6, but the binary is not compatible with 10.4. Thus I tried to compile it in 10.4, but it fails.
This is my code
cd jpeg-8b
sudo ./configure CC="gcc -arch i386 -arch ppc" CXX="g++ -arch i386 -arch ppc" CPP="gcc -E" CXXCPP="g++ -E" -enable-static=yes -enable-shared=no
It fails with the error configure: error: C compiler cannot create executables
How can I compile jpeg-8b in MacOS 10.4?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在调用
config
之前添加export CFLAGS="-arch x86_64 -arch arm64"
后,它对我有用。请参阅 GitHub 要点It worked for me after adding
export CFLAGS="-arch x86_64 -arch arm64"
before callingconfig
. See GitHub gist你可以尝试在安装了10.4 SDK的10.5/10.6上编译它吗
并使用:
并尝试将 --disable-dependency-tracking 添加到 ./configure
Can you try compiling it on 10.5/10.6 with 10.4 SDK installed
and using:
and try adding --disable-dependency-tracking to ./configure