• 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
External C function and duplicate symbol
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

External C function and duplicate symbol


  • Subject: External C function and duplicate symbol
  • From: "Christian Giordano" <email@hidden>
  • Date: Fri, 3 Oct 2008 12:19:03 +0100

Hi guys, I've few functions that I'm keeping on an external .h file.
If the header is included in more than a class I get duplicate symbol
error. I tried using #ifndef which I use on my C++ classes but didn't
bring any luck. I had a look to the various headers in the framework
and I saw they use the following sintax:

#define VEC_ZERO_2(a)				\
{						\
   (a)[0] = (a)[1] = 0.0;			\
}

Isn't there a way to achieve the same but having parameters and returns typed?


Thanks, chr
_______________________________________________

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: External C function and duplicate symbol
      • From: Patrick Mau <email@hidden>
    • Re: External C function and duplicate symbol
      • From: Scott Andrew <email@hidden>
  • Prev by Date: Re: OK To ask iPhone Questions?
  • Next by Date: Re: OK To ask iPhone Questions?
  • Previous by thread: Re: OK To ask iPhone Questions?
  • Next by thread: Re: External C function and duplicate symbol
  • Index(es):
    • Date
    • Thread