Duplicate symbol puzzle
Duplicate symbol puzzle
- Subject: Duplicate symbol puzzle
- From: "McLaughlin, Michael P." <email@hidden>
- Date: Thu, 20 May 2010 11:22:09 -0400
- Acceptlanguage: en-US
- Thread-topic: Duplicate symbol puzzle
Today I encountered a strange error in a Cocoa app with Xcode 3.1.4
targeting Leopard.
Most of the source files in this project are .mm but a few are .m since they
do not reference any STL-type classes.
The error I got was a load error for duplicate symbol _LOGFILE. LOGFILE is
a defined constant in a header, Flags.h.
const flagType LOGFILE = 0x00000001ULL;
The "duplication" was between two .m files both of which #imported Flags.h
which, in fact, is included in most of my source files.
I "fixed" the error simply by renaming one of the files with the duplicate
symbol to .mm.
I cannot understand this error since i) it was my impression that #import
included headers only once and ii) the fix seems that it should be
irrelevant.
FWIW, Flags.h is also protected by a #ifndef construct as well. Also,
cleaning and rebuilding the project was ineffective.
So what am I missing?
--
Mike McLaughlin
_______________________________________________
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