Re: Linker error message ... IOS
Re: Linker error message ... IOS
- Subject: Re: Linker error message ... IOS
- From: "Glenn L. Austin" <email@hidden>
- Date: Mon, 05 Nov 2012 08:22:59 -0800
Well, init is wrong, but a linker message usually means that the file containing the class definition isn't found.
Make sure that your DropdownMenu.m file is a part of the current target.
On Nov 5, 2012, at 7:32 AM, Orson Bushnell <email@hidden> wrote:
> The only thing I can see is that you incorrectly implemented init. But since it doesn't do anything I don't know why you implemented it at all.
>
> If you don't remove it, it should be:
> -(id) init {
> self = [super init];
> return self;
> }
>
>
> Orson Bushnell
>
> On Nov 5, 2012, at 12:08 AM, bml <email@hidden> wrote:
>
>> What am I doing wrong? The myMenu = ... line is causing the error. Because the error message is referencing the i386 architecture, I must have a wrong Build setting.
>>
>> I'm getting the following linker error message:
>> "_OBJC_CLASS_$_DropdownMenu", referenced from:
>> Objc-class-ref in NewAddSessionController.o
>> Symbol(s) not found for architecture i386
>> Clang: error: linker command failed with exit code 1 (use -v to see invocation)
>>
>> from the following code:
>> #import <UIKit/UIKit.h>
>> #import "DropdownMenu.h"
>>
>> @class NewAddSessionController;
>>
>> @protocol NewAddSessionControllerDelegate <NSObject>
>> - (void)newAddSessionControllerDidCancel: (NewAddSessionController *)controller;
>> - (void)newAddSessionControllerDidSave: (NewAddSessionController *)controller newSession:(NSString *)nuSession newAvailabilityTime:(NSDate *)availabilityTime;
>> @end
>>
>> @interface NewAddSessionController : UIViewController <UITextFieldDelegate>
>> @property (nonatomic, weak) id <NewAddSessionControllerDelegate> delegate;
>>
>> @property (nonatomic, retain) DropdownMenu *monthMenu;
>> @property (strong, nonatomic) IBOutlet UITextField *monthTextField;
>>
>> @end
>>
>> .................................................................................
>>
>> #import "NewAddSessionController.h"
>> #import "DropdownMenu.h"
>>
>> @implementation NewAddSessionController
>>
>> @synthesize delegate = _delegate;
>>
>> @synthesize monthMenu = _monthMenu;
>> @synthesize monthTextField = _monthTextField;
>>
>> - (void)viewDidLoad
>> {
>> [super viewDidLoad];
>> NSArray *months = [[NSArray alloc] initWithObjects:
>> @"January",
>> @"February",
>> @"March",
>> @"April",
>> @"May",
>> @"June",
>> @"July",
>> @"August",
>> @"September",
>> @"October",
>> @"November",
>> @"December",
>> nil];
>>
>> DropdownMenu *myMenu = [[DropdownMenu alloc ]init];
>>
>> //self.monthMenu = [myMenu makeMenu:monthTextField titleArray:months targetView:self.view];
>>
>> }
>>
>> .................................................................................
>>
>> #import <UIKit/UIKit.h>
>> #import <Foundation/Foundation.h>
>>
>> @interface DropdownMenu : NSObject <UITextFieldDelegate, UITableViewDelegate, UITableViewDataSource, UIGestureRecognizerDelegate>
>>
>> -(DropdownMenu *) makeMenu:(UITextField *)textfield titleArray:(NSArray *)titleArray targetView:(UIView *)tview;
>>
>> @end
>>
>> .................................................................................
>>
>> #import "DropdownMenu.h"
>>
>> @implementation DropdownMenu
>>
>> @synthesize dropdownTable, selectedTextField, parentView, singleTapGestureRecogniser, textColor;
>>
>> -(id)init{
>> self = [super init];
>> }
>>
>> -(DropdownMenu *) makeMenu:(UITextField *)textfield titleArray:(NSArray *)titleArray targetView:(UIView *)tview {
>> }
>>
>> @end
>>
>> B. Mitchell Loebel
>> 408 425-9920
>> Skype name: multinode
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Xcode-users mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
--
Glenn L. Austin, Computer Wizard and Race Car Driver <><
<http://www.austin-soft.com>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden