SOLVED: compiler giving error within math.h`

Aug 31, 2011 at 12:18am
Hi -

This just cropped up: I'm getting an error:

error: expected unqualified-id before string constant

from within an architecture-specific math.h file. Here's the offending code (it's the extern statement):

1
2
3
#ifdef __cplusplus
extern "C" {
#endif 


Can someone help me figure this out? Thanks.
Last edited on Aug 31, 2011 at 1:55am
Aug 31, 2011 at 12:19am
closed account (zb0S216C)
Where's your closing brace?

Wazzak
Aug 31, 2011 at 12:25am
The closing brace is way, way down the page, after a ton of other code. This is a standard distribution file from Apple, so I'm disinclined to think the problem is actually inside the file (unless my system drive corrupted somehow). I'm just wondering what might cause this to choke.

Thanks...
Aug 31, 2011 at 12:30am
closed account (zb0S216C)
Have you declared any code or included any previous headers prior to including <math.h>?

Wazzak
Aug 31, 2011 at 12:37am
Yes, I have. This is about six levels of includes deep, which is why I didn't try to post all the code.
Aug 31, 2011 at 1:56am
I found the problem. Improper syntax in a class declaration caused this red herring. (I love how C/C++ gives you error way, way downstream from the original problem. Sigh...)
Topic archived. No new replies allowed.