When I compile my iPhone application, xCode gives a "duplicate symbol" error for my variables in MyConstants.h
I thought that if I used:
#import "MyConstants.h"
would he avoid this?
But I still have a problem.
Information added:
An error occurs during "binding." (I just use the "Build and Go" xCode button.)
I also tried (optionally C # import) # ifndef / def method too.
Maybe I should just ask about this:
If you need to access a constant in EVERY part of ALL source code files ... what would you put in your .h file? What would you use to include this constant in other parts of your code.
I thought (but I think itβs not) was simple:
MyConstants.h> int thisIsGlobal = 123;
(No, where I redefine thisIsGlobal anywhere in any code.)
And then just β#import MyConstants.hβ at the top of each of my other source files.
c import iphone xcode compiler-errors
Susanna May 02 '10 at 17:16 2010-05-02 17:16
source share