0
首先我知道這個問題已經在互聯網上發佈了很多次,但每次人們似乎給出不同的解決方案,我嘗試了幾個,沒有爲我工作。Apple Mach-O連接器(Id)錯誤!不知道該怎麼辦
所以當我建立我的應用程序我得到這個錯誤:
Ld /Users/ahoura/Library/Developer/Xcode/DerivedData/Game-dkfwmqscuzprkpappmtrrrahhgtu/Build/Products/Debug-iphonesimulator/TinyWings.app/TinyWings normal i386
cd /Users/ahoura/Downloads/haqu-tiny-wings-e393aa3
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-g++-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk -L/Users/ahoura/Library/Developer/Xcode/DerivedData/Game-dkfwmqscuzprkpappmtrrrahhgtu/Build/Products/Debug-iphonesimulator -F/Users/ahoura/Library/Developer/Xcode/DerivedData/Game-dkfwmqscuzprkpappmtrrrahhgtu/Build/Products/Debug-iphonesimulator -filelist /Users/ahoura/Library/Developer/Xcode/DerivedData/Game-dkfwmqscuzprkpappmtrrrahhgtu/Build/Intermediates/Game.build/Debug-iphonesimulator/TinyWings.build/Objects-normal/i386/TinyWings.LinkFileList -mmacosx-version-min=10.6 -lz -Xlinker -objc_abi_version -Xlinker 2 -framework QuartzCore -framework OpenGLES -framework OpenAL -framework AudioToolbox -framework AVFoundation -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/ahoura/Library/Developer/Xcode/DerivedData/Game-dkfwmqscuzprkpappmtrrrahhgtu/Build/Products/Debug-iphonesimulator/TinyWings.app/TinyWings
ld: duplicate symbol _screenWidth in /Users/ahoura/Library/Developer/Xcode/DerivedData/Game-dkfwmqscuzprkpappmtrrrahhgtu/Build/Intermediates/Game.build/Debug-iphonesimulator/TinyWings.build/Objects-normal/i386/pauseMenu.o and /Users/ahoura/Library/Developer/Xcode/DerivedData/Game-dkfwmqscuzprkpappmtrrrahhgtu/Build/Intermediates/Game.build/Debug-iphonesimulator/TinyWings.build/Objects-normal/i386/mainMenu.o for architecture i386
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-g++-4.2 failed with exit code 1
很多人似乎說,它是與丟失的庫或包含一種特殊的方式一個文件!
注意我用的Box2D的,所以C和C++混合並將文件的擴展名是.mm
謝謝,這工作,但後來當我使用這些變量,它說,他們是不確定的!我想如何使用這些變量? – ahoura
讓我們看看代碼 - 而且很多人似乎認爲它與缺少的庫或包含一個特殊的文件有關!似乎無關你的問題 – Mark
以及代碼很長,但我宣佈2 varars:'int screenWidth = 480; int screenHeight = 320;'在這兩個文件中,只是用它們在屏幕上放置東西,但如果代碼真的需要,那麼我可以把它放在 – ahoura