我正在尝试将包含boost 1.37和wxwidgets的Windows项目移植到Mac.它编译好了,但链接器给了我一个"文件不是架构ppc所需的架构"错误的libz.1.dylib和相同的消息作为警告其他一些库.我还得到了libz.1.dylib的"重复dylib"警告.
链接器输出如下所示:
使用配置"Debug"构建项目"Gemsweeper Mac"的目标"Gemsweeper Mac"
检查依赖关系
Ld "/Users/adriangrigore/Documents/Gemsweeper Mac/Gemsweeper MacOS/Gemsweeper Mac/build/Debug/Gemsweeper Mac.app/Contents/MacOS/Gemsweeper Mac" normal i386 cd "/Users/adriangrigore/Documents/Gemsweeper Mac/Gemsweeper MacOS/Gemsweeper Mac" setenv MACOSX_DEPLOYMENT_TARGET 10.4 /Developer/usr/bin/g++-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk "-L/Users/adriangrigore/Documents/Gemsweeper Mac/Gemsweeper MacOS/Gemsweeper Mac/build/Debug" -L/Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib -L/opt/local/lib "-F/Users/adriangrigore/Documents/Gemsweeper Mac/Gemsweeper MacOS/Gemsweeper Mac/build/Debug" -F/Users/adriangrigore/Library/Frameworks -F/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks -filelist "/Users/adriangrigore/Documents/Gemsweeper Mac/Gemsweeper MacOS/Gemsweeper Mac/build/Gemsweeper Mac.build/Debug/Gemsweeper Mac.build/Objects-normal/i386/Gemsweeper Mac.LinkFileList" -mmacosx-version-min=10.4 -L/opt/local/lib -L/Users/adriangrigore/wxwidgets-manual/wxMac-2.8.9/lib /opt/local/lib/libboost_system-mt.a /opt/local/lib/libboost_program_options-mt.a /opt/local/lib/libboost_thread-mt.a -arch ppc -arch i386 -framework IOKit -framework Carbon -framework Cocoa -framework System -framework QuickTime -framework OpenGL -framework AGL /Users/adriangrigore/wxwidgets-manual/wxMac-2.8.9/lib/libwx_mac-2.8.a -framework WebKit -lwxexpat-2.8 -lwxtiff-2.8 -lwxjpeg-2.8 -lwxpng-2.8 -lz -lpthread -liconv -framework SDL -framework Cocoa -o "/Users/adriangrigore/Documents/Gemsweeper Mac/Gemsweeper MacOS/Gemsweeper Mac/build/Debug/Gemsweeper Mac.app/Contents/MacOS/Gemsweeper Mac" ld warning: in /Users/adriangrigore/Documents/Gemsweeper Mac/Gemsweeper MacOS/Gemsweeper Mac/build/Gemsweeper Mac.build/Debug/Gemsweeper Mac.build/Objects-normal/i386/main.o, file is not of required architecture ld warning: in /Users/adriangrigore/Documents/Gemsweeper Mac/Gemsweeper MacOS/Gemsweeper Mac/build/Gemsweeper Mac.build/Debug/Gemsweeper Mac.build/Objects-normal/i386/variousfunctions-xcode.o, file is not of required architecture ld warning: in /Users/adriangrigore/Documents/Gemsweeper Mac/Gemsweeper MacOS/Gemsweeper Mac/build/Gemsweeper Mac.build/Debug/Gemsweeper Mac.build/Objects-normal/i386/ParticleLayers.o, file is not of required architecture ld warning: in /Users/adriangrigore/Documents/Gemsweeper Mac/Gemsweeper MacOS/Gemsweeper Mac/build/Gemsweeper Mac.build/Debug/Gemsweeper Mac.build/Objects-normal/i386/SDLMain.o, file is not of required architecture ld warning: in /opt/local/lib/libboost_system-mt.a, file is not of required architecture ld warning: in /opt/local/lib/libboost_program_options-mt.a, file is not of required architecture ld warning: in /opt/local/lib/libboost_thread-mt.a, file is not of required architecture ld warning: in /opt/local/lib/libz.dylib, file is not of required architecture ld warning: in /opt/local/lib/libiconv.dylib, file is not of required architecture ld: in /opt/local/lib/libz.1.dylib, file is not of required architecture for architecture ppc collect2: ld returned 1 exit status ld warning: duplicate dylib /opt/local/lib/libz.1.dylib ld warning: duplicate dylib /opt/local/lib/libiconv.2.dylib
我对Mac平台很新,所以任何帮助都将不胜感激!
谢谢,
阿德里安