2009-04-14 172 views
1

我有一个iPhone(Xcode)项目工作正常。有些东西一定是被改变了,因为突然之间我得到的错误涉及到NSLogUIActionSheet,以及其他一些我一直在使用的项目JUST FINE。我错过了什么?任何援助将非常感谢!iPhone - 奇怪的编译错误

Checking Dependencies 

Ld /Users/markgoldberg/Documents/iPhoneApps/iPhone_PNP/build/Debug-iphonesimulator/iPhone_PNP.app/iPhone_PNP normal i386 
    cd /Users/markgoldberg/Documents/iPhoneApps/iPhone_PNP 
    setenv MACOSX_DEPLOYMENT_TARGET 10.5 
    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/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk -L/Users/markgoldberg/Documents/iPhoneApps/iPhone_PNP/build/Debug-iphonesimulator -F/Users/markgoldberg/Documents/iPhoneApps/iPhone_PNP/build/Debug-iphonesimulator -filelist /Users/markgoldberg/Documents/iPhoneApps/iPhone_PNP/build/iPhone_PNP.build/Debug-iphonesimulator/iPhone_PNP.build/Objects-normal/i386/iPhone_PNP.LinkFileList -mmacosx-version-min=10.5 -framework Foundation -framework UIKit -framework CoreGraphics -o /Users/markgoldberg/Documents/iPhoneApps/iPhone_PNP/build/Debug-iphonesimulator/iPhone_PNP.app/iPhone_PNP 
Undefined symbols: 
    ".objc_class_name_SettingsWindowViewController", referenced from: 
     [email protected][email protected][email protected] in iPhone_PNPAppDelegate.o 
ld: symbol(s) not found 
collect2: ld returned 1 exit status 

回答

1

尝试一个干净的版本。

+0

请参阅下面的帖子。 – Dutchie432 2009-04-14 16:51:06

1

您还没有在任何地方定义类SettingsWindowViewController

从您的解决方案(从项目中删除SettingsWindowViewController.m并重新添加它)看起来他们没有被包括在目标的“编译源”阶段Ias建议由cdespinosa)。您可以通过在“组和文件”窗格中的目标项目中打开“编译源”扭曲来检查此问题。

除了cdespinosa建议设置目标成员资格的方法之外,还可以在“组和文件”窗格中通过左键单击标题显示一个带有“目标成员”的额外列。

+0

或者该文件未包含在构建中。 – 2009-04-15 11:27:27

+0

请在下面看到我的发布代码...这是我的appdelegate代码。在我的项目中还有一个'SettingsWindowViewController.h'和'.m'文件 – Dutchie432 2009-04-15 11:37:06

+0

它没有在这里正确格式化......我可以给你发电子邮件吗? – Dutchie432 2009-04-15 11:41:23

3

你解决了这个问题,但你可能不知道为什么。弄清楚什么是错误的,为什么要做你所做的修复它很重要,所以你可以让它不再发生。

问题很可能是您的SettingsWindowViewController.m文件不是您正在构建的iPhone_PNP目标的成员。项目只是容器;目标实际上构建的东西,如果文件在项目中但未分配给目标,则不会构建。

删除文件并重新添加它默认将其添加到当前目标。您可能已经看到一个带有复选框的列表,并且没有注意到它,但该复选框是解决问题的方法。

未来做到这一点的更简单的方法就是将源文件拖动到目标中,或选择Get Info并在General选项卡中单击目标的复选框。