简体   繁体   中英

Newbie Error Apple Mach-O Linker Error

I'm fairly new here, but I'm having a Apple Mach-O Linker Error: Error

This is my app delegate! // // AppDelegate.m // VCContainmentTut // // Created by A Khan on 01/05/2013. // Copyright (c) 2013 AK. All rights reserved. //

#import "AppDelegate.h"
#import "RootController.h"
#import "ViewController.h"
#import "VidViewController.h"
#import "SelectVideo1.h"

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{

    VidViewController *vidViewController = [[VidViewController alloc] init];
    UINavigationController *navController1 = [[UINavigationController alloc] initWithRootViewController:vidViewController];
[self.window setRootViewController:navController1];

    SelectVideo1 *selectVideo1 = [[SelectVideo1 alloc] initWith:@"Movie Trailers"];
    //[self.navController pushViewController:selectVideo1 animated:YES];


    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    UIStoryboard *tabStoryBoard = [UIStoryboard storyboardWithName:@"TabStoryboard" bundle:nil];
    UIStoryboard *navStoryBoard = [UIStoryboard storyboardWithName:@"NavStoryboard" bundle:nil];
    UINavigationController *navController = [navStoryBoard instantiateViewControllerWithIdentifier:@"Nav Controller"];
    UITabBarController *tabController = [tabStoryBoard instantiateViewControllerWithIdentifier:@"Tab Controller"];
    ViewController *redVC, *greenVC;
    redVC = [[ViewController alloc] init];
    greenVC = [[ViewController alloc] init];

    redVC.view.backgroundColor = [UIColor redColor];
    greenVC.view.backgroundColor = [UIColor greenColor];

    RootController *menuController = [[RootController alloc]
                                      initWithViewControllers:@[tabController, redVC, greenVC, navController, selectVideo1]
                                      andMenuTitles:@[@"Cheats", @"Videos", @"WalkThroughs", @"Nav"]];
    self.window.rootViewController = menuController;
    self.window.backgroundColor = [UIColor whiteColor];
    [self.window makeKeyAndVisible];
    return YES;
}



@end

Your errors are caused by you trying to use code that you haven't told the project (so the linker) exists. You need to add the dependencies to the project. In this case, the frameworks defining the features you're trying to use.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM