|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
I’m porting old code from Codewarrior to Xcode 2.2 (not using the project importer, just building a new xcode project from scratch) and I have a problem with typedefs. This is all C++ code and I have set Xcode to always use the C++ compiler.
In a .h file I have a typedef:
typedef unsigned char *PascalStringPtr;
I have another .h file that includes the above .h file and then in a class declaration uses the new type PascalStringPtr:
Xcode complains that PascalStringPtr “does not name a type”.
After some futzing around I found out that:
So what the heck is going on here?!?!?
I did some searching and found a posting (http://gcc.gnu.org/ml/gcc-help/2005-06/msg00097.html) about someone who had a similar experience and the issue was related to an X.h file including a Y.h file which itself then included X.h, etc.
I don’t have my code at this computer so I can’t test this out today. My .h files are ALL protected with :
…which should preclude a lot (but not necessarily all) of nested and incestuous .h file inclusion problems.
Can anyone shed any light on this problem? Is it indeed .h files including other .h files that then include the original .h file?
Is there any compiler setting I can play with to work around this? Do I have to re configure my #includes?
Any insight is very much appreciated…
_______________________________________________ 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
Visit the Apple Store online or at retail locations.
Copyright © 2011 Apple Inc. All rights reserved.