您好,我是C編程新手,一直在使用Xcode編寫我的簡單CS硬件。他們一直工作正常,直到幾個星期前,當我不斷收到下面的錯誤代碼。我繼續嘗試運行一些我知道的舊程序,但仍然會出現此錯誤。我到處尋找並找不到解決方案。如果你有解決方案,請幫助。儘管我很喜歡具體的答案,但我對此很新,希望你在解釋時考慮到這一點。非常感謝你。如何修復Command/Developer/usr/bin/clang失敗,退出代碼1?
Ld /Users/------/Library/Developer/Xcode/DerivedData/Test-gehcspqxloqgaahbdyjslulobzys/Build/Products/Debug/Test normal x86_64
cd /Users/------/Desktop/Test
setenv MACOSX_DEPLOYMENT_TARGET 10.7
/Developer/usr/bin/clang -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.7.sdk -L/Users/------/Library/Developer/Xcode/DerivedData/Test-gehcspqxloqgaahbdyjslulobzys/Build/Products/Debug -F/Users/------/Library/Developer/Xcode/DerivedData/Test-gehcspqxloqgaahbdyjslulobzys/Build/Products/Debug -filelist /Users/------/Library/Developer/Xcode/DerivedData/Test-gehcspqxloqgaahbdyjslulobzys/Build/Intermediates/Test.build/Debug/Test.build/Objects-normal/x86_64/Test.LinkFileList -mmacosx-version-min=10.7 -o /Users/------/Library/Developer/Xcode/DerivedData/Test-gehcspqxloqgaahbdyjslulobzys/Build/Products/Debug/Test
ld: duplicate symbol _main in /Users/------/Library/Developer/Xcode/DerivedData/Test-gehcspqxloqgaahbdyjslulobzys/Build/Intermediates/Test.build/Debug/Test.build/Objects-normal/x86_64/HW4.o and /Users/------/Library/Developer/Xcode/DerivedData/Test-gehcspqxloqgaahbdyjslulobzys/Build/Intermediates/Test.build/Debug/Test.build/Objects-normal/x86_64/HW3.o for architecture x86_64
Command /Developer/usr/bin/clang failed with exit code 1
這是什麼錯誤代碼?
Command /Developer/usr/bin/clang failed with exit code 1
停止使用Xcode。它引入了一層你不需要的混淆。學習從命令行構建可執行文件是一項重要技能,並不困難。打開一個shell並用gcc編譯。 –