이 사진은 저에게 새로운 이야기입니다. RootViewController.o가 무엇인지 확실하지 않은가요? 이 프로젝트는 .m & .h입니다. 시뮬레이터 3.0 용 건물. 빌드하기 전에 청소 (Shift-⌘-K).Xcode 링크 오류가 발생했습니다.
최근에 RootViewController가있는 다른 프로젝트의 일부 클래스를 추가했지만 이전 프로젝트를 이전하지 않았습니다. 이후 지어지지 않았습니다. 이것은 문제의 일부일 수 있습니다.
건물 대상 "MyApp를"프로젝트의 구성 "MyApp를" "디버그"- (1 오류)
cd "/Volumes/MacHD/Development/iPhone/MyApp"
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/Volumes/MacHD/Development/iPhone/MyApp/build/Debug-iphonesimulator -F/Volumes/MacHD/Development/iPhone/MyApp/build/Debug-iphonesimulator -filelist /Volumes/MacHD/Development/iPhone/MyApp/build/MyApp.build/Debug-iphonesimulator/MyApp.build/Objects-normal/i386/MyApp.LinkFileList -mmacosx-version-min=10.5 -framework Foundation -framework UIKit -framework CoreGraphics -framework AddressBook -framework AddressBookUI -o /Volumes/MacHD/Development/iPhone/MyApp/build/Debug-iphonesimulator/MyApp.app/MyApp
Undefined symbols:
".objc_class_name_MyViewController", referenced from:
[email protected][email protected][email protected] in RootViewController.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
빌드가 실패 (1 오류)
편집 : 모든 타겟을 청소했습니다. 여전히 빌드되지 않습니다.
RootViewController.h :
#import <UIKit/UIKit.h>
#import "MyViewController.h" //tried with this and as @class MyViewController
@class AddViewController, EditingViewController;
@interface RootViewController : UITableViewController <UITableViewDelegate, UITableViewDataSource> {
MyViewController *myVC;
UINavigationController *navController;
AddViewController *addViewController;
NSArray *keys;
NSNumberFormatter *currencyFormatter;
}
RootViewController.m : 제작하기 전에 모든 대상을 청소하는
#import "RootViewController.h"
#import "MyAppDelegate.h"
#import "MyViewController.h"
#import "AddViewController.h"
#import "EditingViewController.h"
#import "MyObject.h"
#import "ViewCell.h"
#import "AppColors.h"
#import "CustomCellBackgroundView.h"
// Manage the editing view controller from this class so it can be easily accessed from both the detail and add controllers.
static EditingViewController *__editingViewController = nil;
@implementation RootViewController
안녕하세요 롭, 다시 도와 줘서 고마워. #RotViewController.m에서 MyViewController.h (MVC)를 가져옵니다. (RVC) 및 RVC.h 내에서 @class MVC 및 # import MVC.h 시도했습니다. 이 "기호를 찾을 수 없음"은 무엇을 의미합니까? "심볼"은 컴파일러가 말하는 것입니다. – Meltemi
Meltemi : 당신은 전처리에 대해 이야기하고 있습니다. '# import'는 링크와 아무 관련이 없습니다. MyViewController.m이 대상에 추가되었는지 확인해야합니다. –
그랬어! 감사! 전에 살 필요가 없었어요. 살고 배우고 ... – Meltemi