Obj*_*mer 10 xcode compiler-errors objective-c
我试图用Xcode制作一个简单的Mac Objective-C应用程序,以保持两个玩家的得分,玩每个玩家最多36个分数的简单游戏.由于其功能有限,它不是一个非常实用的应用程序,它主要用于实践.我试图通过"首选项"窗口稍微扩展应用程序,该窗口会在单击菜单项时弹出.
我创建了一个文件来控制men项目,然后在点击它时弹出一个nib.所有这一切都运行良好,会弹出一个新窗口.我在笔尖上放置滑块,文本字段等,并将它们连接到动作.所有这一切都很好.
当我尝试将文件导入我的根控制器以便我可以在应用程序中使用用户的选择时出现问题.
我收到以下编译器错误:
Command /Developer/usr/bin/clang failed with exit code 1
Run Code Online (Sandbox Code Playgroud)
以及所有这些:
LD "/用户/名为myUsername /库/开发商/ Xcode中/ DerivedData/SimpleScoreKeeper_Mac-bjvjeiybvmwfjpfilvnpezarwkml /编译/产品/调试/ SimpleScoreKeeper Mac.app/Contents/MacOS/SimpleScoreKeeper Mac的" 正常x86_64的CD"/用户/名为myUsername/Dropbox的/ iPhone应用程序/ SimpleScoreKeeper Mac"setenv MACOSX_DEPLOYMENT_TARGET 10.6/Developer/usr/bin/clang -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/myusername/Library/Developer/Xcode/DerivedData/SimpleScoreKeeper_Mac-bjvjeiybvmwfjpfilvnpezarwkml/Build/Products/Debug -F/Users/myusername/Library/Developer/Xcode/DerivedData/SimpleScoreKeeper_Mac-bjvjeiybvmwfjpfilvnpezarwkml/Build/Products/Debug -filelist"/ Users/myusername/Library/Developer/Xcode/DerivedData/SimpleScoreKeeper_Mac-bjvjeiybvmwfjpfilvnpezarwkml/Build /中间体/ SimpleScoreKeeper Mac.build/Debug/SimpleScoreKeeper Mac.build/Objects-normal/x86_64/SimpleScoreKeeper Mac.LinkFileList "-mmacosx版本分钟= 10.6 -framework可可-o"/用户/名为myUsername /库/开发商/ Xcode中/ DerivedData/SimpleScoreKeeper_Mac-bjvjeiybvmwfjpfilvnpezarwkml /编译/产品/调试/ SimpleScoreKeeper Mac.app/Contents/MacOS/SimpleScoreKeeper的Mac"
ld:/ Users/myusername/Library/Developer/Xcode/DerivedData/SimpleScoreKeeper_Mac-bjvjeiybvmwfjpfilvnpezarwkml/Build/Intermediates/SimpleScoreKeeper Mac.build/Debug/SimpleScoreKeeper Mac.build/Objects-normal/x86_64/Prefrences.o中的重复符号_addScores和/用户/名为myUsername /库/开发商/ Xcode中/ DerivedData/SimpleScoreKeeper_Mac-bjvjeiybvmwfjpfilvnpezarwkml /编译/中间体/ SimpleScoreKeeper Mac.build/Debug/SimpleScoreKeeper Mac.build/Objects-normal/x86_64/RootController.o用于建筑x86_64的铿锵:错误:连接器命令退出代码1失败(使用-v查看调用)命令/ Developer/usr/bin/clang失败,退出代码为1
我项目中的(可能)相关文件如下.
RootController.h - All the interface declarations for stuff in the MainMenu.xib window
RootController.m - Where I need to import the files to
MainMenu.xib - The nib owned by the RootController class
Preferences.h - A file I'd want to import, but it won't work.
Preferences.m - A file I'd (maybe) want to import, but it won't work.
Preferences.xib - The nib owned by the Preferences class.
PreferencesMenuController.h - Where I declare the clickPreferences action. (Liked to MainMenu.xib)
PreferencesMenuController.m - Where I say that clickPreferences opens up Preferences nib. (Linked to MainMenu.xib)
Run Code Online (Sandbox Code Playgroud)
我有没有理由得到这个错误?在我导入的课程中是否需要做些什么?请相当详细,我是语言somight的新手,不知道如何做某些事情.如果有任何我需要澄清的内容,请告诉我.
编辑:这是我无法导入的文件的代码.
#import "Preferences.h"
@implementation Preferences
int addScores;
- (IBAction)addScoresToggled
{
NSLog(@"addScores was toggled.");
}
- (id)initWithWindow:(NSWindow *)window
{
self = [super initWithWindow:window];
if (self) {
}
return self;
}
- (void)dealloc
{
[super dealloc];
}
- (void)windowDidLoad
{
[super windowDidLoad];
}
@end
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
50696 次 |
| 最近记录: |