When I create for the device (ipad 3), my build work is found without warning or error, but when I create it for the iPad or iPhone simulator, I get linker errors, such as:
duplicate symbol _CONSTANT_NAME in: /Users/me/libLibrary.a(FileName.o) /Users/me/libOtherLibrary.a(OtherFileName.o)
Constants are also defined in header files.
const int CONSTANT_NAME = 123;
I tried to wrap the constant in the #define tag like this:
#ifndef CONSTANTS_H #define CONSTANTS_H const int CONSTANT_NAME = 123; #endif
Why does this work great when creating a device, but causing problems when creating a simulator?
Rob gill
source share