• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
linking error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

linking error


  • Subject: linking error
  • From: WT <email@hidden>
  • Date: Thu, 25 Jun 2009 10:44:00 +0200

Hello list,

I have a linking error that is puzzling me and I'd be grateful for some enlightenment.

In AppDelegate.h:

#import "SharedDefs.h"

In AppDelegate.m:

#import "AppDelegate.h"
#import "SomeClass.h"

In SomeClass.m:

#import "SomeClass.h"
#import "SharedDefs.h"

SharedDefs.h contains definitions (#define's, struct's and enum's) that are shared by several classes.

This works fine until I add

NSString* const someString = @"foo";

to SharedDefs.h, at which point I get a duplicate symbol linking error for _someString.

What gives?

Thanks in advance.
Wagner
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: linking error
      • From: Alexander Spohr <email@hidden>
    • Re: linking error
      • From: Dave Keck <email@hidden>
  • Prev by Date: Re: Design for custom tableviewcell button action
  • Next by Date: Re: Design for custom tableviewcell button action
  • Previous by thread: Re: Design for custom tableviewcell button action
  • Next by thread: Re: linking error
  • Index(es):
    • Date
    • Thread