SDL和Xcode。构建并运行错误

时间:2011-05-08 04:26:00

标签: xcode warnings sdl

我已经离开了这个教程http://www.noquarterarcade.com/xcode-sdl-development-setup

因此,我已经下载了SDL运行时库和SDL开发库,并将其内容放在指定的文件夹中。我确保已正确执行这些步骤。

然而,当我点击构建并运行时,我得到一个错误和2个警告。

错误: 1)Command / Developer / usr / bin / gcc-4.2失败,退出代码为1

构建项目尝试尝试使用配置调试

Ld build/Try.build/Debug/Try.build/Objects-normal/x86_64/Try normal x86_64
cd "/Users/nickcarver/Desktop/Lazy Foo Tutorials/Try"
setenv MACOSX_DEPLOYMENT_TARGET 10.6
/Developer/usr/bin/gcc-4.2 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk "-L/Users/nickcarver/Desktop/Lazy Foo Tutorials/Try/build/Debug" "-F/Users/nickcarver/Desktop/Lazy Foo Tutorials/Try/build/Debug" -F/Users/nickcarver/Library/Frameworks -F/Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks -filelist "/Users/nickcarver/Desktop/Lazy Foo Tutorials/Try/build/Try.build/Debug/Try.build/Objects-normal/x86_64/Try.LinkFileList" -mmacosx-version-min=10.6 -framework SDL -framework Cocoa -o "/Users/nickcarver/Desktop/Lazy Foo Tutorials/Try/build/Try.build/Debug/Try.build/Objects-normal/x86_64/Try"

ld: warning: directory '/Users/nickcarver/Library/Frameworks' following -F not found
ld: framework not found SDL
collect2: ld returned 1 exit status
Command /Developer/usr/bin/gcc-4.2 failed with exit code 1

Ld build/Try.build/Debug/Try.build/Objects-normal/i386/Try normal i386
cd "/Users/nickcarver/Desktop/Lazy Foo Tutorials/Try"
setenv MACOSX_DEPLOYMENT_TARGET 10.4
/Developer/usr/bin/gcc-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk "-L/Users/nickcarver/Desktop/Lazy Foo Tutorials/Try/build/Debug" "-F/Users/nickcarver/Desktop/Lazy Foo Tutorials/Try/build/Debug" -F/Users/nickcarver/Library/Frameworks -F/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks -filelist "/Users/nickcarver/Desktop/Lazy Foo Tutorials/Try/build/Try.build/Debug/Try.build/Objects-normal/i386/Try.LinkFileList" -mmacosx-version-min=10.4 -framework SDL -framework Cocoa -o "/Users/nickcarver/Desktop/Lazy Foo Tutorials/Try/build/Try.build/Debug/Try.build/Objects-normal/i386/Try"

ld: warning: directory '/Users/nickcarver/Library/Frameworks' following -F not found

警告: 1)目录'/ Users / RustyShackleford / Library / Frameworks'跟随-F未找到

它说了两次警告

构建项目尝试尝试使用配置调试

Ld build/Try.build/Debug/Try.build/Objects-normal/x86_64/Try normal x86_64
cd "/Users/nickcarver/Desktop/Lazy Foo Tutorials/Try"
setenv MACOSX_DEPLOYMENT_TARGET 10.6
/Developer/usr/bin/gcc-4.2 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk "-L/Users/nickcarver/Desktop/Lazy Foo Tutorials/Try/build/Debug" "-F/Users/nickcarver/Desktop/Lazy Foo Tutorials/Try/build/Debug" -F/Users/nickcarver/Library/Frameworks -F/Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks -filelist "/Users/nickcarver/Desktop/Lazy Foo Tutorials/Try/build/Try.build/Debug/Try.build/Objects-normal/x86_64/Try.LinkFileList" -mmacosx-version-min=10.6 -framework SDL -framework Cocoa -o "/Users/nickcarver/Desktop/Lazy Foo Tutorials/Try/build/Try.build/Debug/Try.build/Objects-normal/x86_64/Try"

ld: warning: directory '/Users/nickcarver/Library/Frameworks' following -F not found
ld: framework not found SDL
collect2: ld returned 1 exit status
Command /Developer/usr/bin/gcc-4.2 failed with exit code 1

Ld build/Try.build/Debug/Try.build/Objects-normal/i386/Try normal i386
cd "/Users/nickcarver/Desktop/Lazy Foo Tutorials/Try"
setenv MACOSX_DEPLOYMENT_TARGET 10.4
/Developer/usr/bin/gcc-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk "-L/Users/nickcarver/Desktop/Lazy Foo Tutorials/Try/build/Debug" "-F/Users/nickcarver/Desktop/Lazy Foo Tutorials/Try/build/Debug" -F/Users/nickcarver/Library/Frameworks -F/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks -filelist "/Users/nickcarver/Desktop/Lazy Foo Tutorials/Try/build/Try.build/Debug/Try.build/Objects-normal/i386/Try.LinkFileList" -mmacosx-version-min=10.4 -framework SDL -framework Cocoa -o "/Users/nickcarver/Desktop/Lazy Foo Tutorials/Try/build/Try.build/Debug/Try.build/Objects-normal/i386/Try"

ld: warning: directory '/Users/nickcarver/Library/Frameworks' following -F not found

我该如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

首先,仔细检查重复项。 另外,请尝试更改基础模板。