Re: gcc 4.0 compiling and parse error in <exception>
Re: gcc 4.0 compiling and parse error in <exception>
- Subject: Re: gcc 4.0 compiling and parse error in <exception>
- From: Jesper Papmehl-Dufay <email@hidden>
- Date: Mon, 9 Jun 2008 16:53:46 +0200
It looks like you get the error when Xcode is precompiling your prefix
file.
Do you have any C code in your project? If so, do you have #include
guards in your prefix file to block any C++-specific includes from
being processed when the prefix file is being precompiled for C code?
I use
#ifdef __cplusplus
// C++-specific includes and defines
#endif
// Common includes and defines for both C and C++
in my prefix file for projects which mix C and C++ code.
(Unlike CodeWarrior, Xcode actually precompiles the prefix file
separately for C and C++ code if you have code of both flavours in
your project, so anything you put in the prefix file must be valid C
code as well as valid C++ code.)
HTH
/Jesper Papmehl-Dufay
Propelelrheads
9 jun 2008 kl. 15.51 skrev Robert Welz:
Hello.
I am transforming a CodeWarrior program for XCode and have syntax
and parse errors which I can't resolve:
>>>>
In file included from /Volumes/XMen Arbeit/Developer/Applications/
Metrowerks CodeWarrior 9.0/Metrowerks CodeWarrior/MacOS Support/
PowerPlant/Support Classes/LException.h:12,
from /Volumes/XMen Arbeit/Developer/Applications/
Metrowerks CodeWarrior 9.0/Metrowerks CodeWarrior/MacOS Support/
PowerPlant/Utility Classes/UDebugging.h:93,
from /Volumes/XMen Arbeit/Developer/Applications/
Metrowerks CodeWarrior 9.0/Metrowerks CodeWarrior/MacOS Support/
PowerPlant/Utility Classes/UException.h:13,
from /Volumes/XMen Arbeit/Developer/Applications/
Metrowerks CodeWarrior 9.0/Metrowerks CodeWarrior/MacOS Support/
PowerPlant/PowerPlant Headers/PP_Prefix.h:22,
from /Volumes/XMen Arbeit/Source/Grand Central Pro/
GrandCentral/Develop/Mac/XRay Client 1.2.4 XCode/../../Common/HOSAL/
GrandCentral.h:154,
from /Volumes/XMen Arbeit/Source/Grand Central Pro/
GrandCentral/Develop/Mac/XRay Client 1.2.4 XCode/Prefix/
XCodePrecompiledHeader.h:31:
/Volumes/XMen Arbeit/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/c++/
4.0.0/exception:8: error: parse error before string constant
/Volumes/XMen Arbeit/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/c++/
4.0.0/exception:27: error: syntax error before 'const'
/Volumes/XMen Arbeit/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/c++/
4.0.0/exception: In function 'what':
/Volumes/XMen Arbeit/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/c++/
4.0.0/exception:27: warning: type defaults to 'int' in declaration
of 'throw'
/Volumes/XMen Arbeit/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/c++/
4.0.0/exception:28: error: parse error before '}' token
/Volumes/XMen Arbeit/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/c++/
4.0.0/exception:27: error: declaration for parameter 'throw' but no
such parameter
/Volumes/XMen Arbeit/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/c++/
4.0.0/exception:35: warning: implicit declaration of function
'bad_exception'
/Volumes/XMen Arbeit/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/c++/
4.0.0/exception:35: error: parse error before 'throw'
/Volumes/XMen Arbeit/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/c++/
4.0.0/exception: At top level:
/Volumes/XMen Arbeit/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/c++/
4.0.0/exception:47: error: parse error before 'throw'
/Volumes/XMen Arbeit/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/c++/
4.0.0/exception:47: warning: type defaults to 'int' in declaration
of 'throw'
/Volumes/XMen Arbeit/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/c++/
4.0.0/exception:47: warning: data definition has no type or storage
class
/Volumes/XMen Arbeit/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/c++/
4.0.0/exception:53: error: parse error before 'throw'
/Volumes/XMen Arbeit/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/c++/
4.0.0/exception:53: warning: type defaults to 'int' in declaration
of 'throw'
/Volumes/XMen Arbeit/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/c++/
4.0.0/exception:53: warning: data definition has no type or storage
class
/Volumes/XMen Arbeit/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/c++/
4.0.0/exception:68: error: parse error before 'throw'
/Volumes/XMen Arbeit/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/c++/
4.0.0/exception:68: warning: type defaults to 'int' in declaration
of 'throw'
/Volumes/XMen Arbeit/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/c++/
4.0.0/exception:68: warning: data definition has no type or storage
class
/Volumes/XMen Arbeit/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/c++/
4.0.0/exception:69: error: parse error before '}' token
/Volumes/XMen Arbeit/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/c++/
4.0.0/exception:72: error: syntax error before '{' token
\>>>>
It stucks on
<exception>
extern "C++" {
in
/Volumes/XMen Arbeit/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/c++/
4.0.0/exception
May there be a library missing or a compiler setting I havn't tried?
Thanks for your valuable time,
kind regards,
Robert
---
Robert Welz
Pro2col Limited
Weinheimer Strasse 64
D-68309 Mannheim
t 0621 724 5837
f 0621 724 5782
w http://www.pro2col.de
e email@hidden
skype ro.welz
Pro2col Technischer Support
email@hidden
Tel.: +49 621 724 5837
Apple Solution Expert - Print & Publishing
File transfer & workflow specialists for the graphic art & prepress
industry
Distributors for DevZeroG, Hermstedt & OneVision within the UK and
Ireland
Pro2col's legal position regarding Internet communications can be
found at http://pro2col.com/about/legal.asp
_______________________________________________
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
_______________________________________________
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