Hello,
I'm trying to port my application from codewarrior to xcode. I'm getting thousands of warnings which I am ignoring. Most of the actual errors I have been able to fix so far, but I've just run into a set of errors like the following:
global.h:39: error: expected initializer before '*' token global.h:80: error: 'Boolean' does not name a type global.h:157: error: 'Boolean' does not name a type global.h:158: error: 'Boolean' does not name a type global.h:201: error: 'Boolean' does not name a type
These are due to some declarations like the following in the above header file:
extern FILE *log_file; extern Boolean logging;
This piece of code is a small set of sources separate from the rest of my app, and under Codewarrior it always compiled fine. From looking at the includes, I am not sure where it was getting the definitions of types for FILE and Boolean, etc. I guess these were somehow defined globally, ie without needing to explicitly include them? As in a prefix file or something?
I did have this text in my codewarrior c++ prefix panel:
/* settings imported from old "C/C++ Language" panel */
#if !__option(precompile) #include "MSL MacHeadersMach-O.h" /* was "Prefix file" */ #endif
#undef MAC_OS_X_VERSION_MIN_REQUIRED #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_3
Could that explain why it compiled in codewarrior but not in Xcode? I am a little lost. With Xcode, I shouldn't be including something like MSL MacHeadersMach-O.h, right? Isn't that a metrowerks file?
My current prefix file for the xcode project is just:
#ifndef __Prefix_File__ #define __Prefix_File__
#define TARGET_API_MAC_OSX 1
#endif // __Prefix_File__
Should it include something else, to prevent those types of errors above?
Thanks very much for any clues. Bob
|