Valhalla Legends Forums Archive | C/C++ Programming | What is going on with my header files?

AuthorMessageTime
shout
I'm working on a project that uses math.h, and I compiled, it worked fine. I changed where a static control was on a window, and BAM! This:

[code]
c:\Program Files\...\Vc7\include\math.h(36): warning C4518: 'extern ' : storage-class or type specifier(s) unexpected here; ignored
c:\Program Files\...\Vc7\include\math.h(36): error C2143: syntax error : missing ';' before 'string'
c:\Program Files\...\Vc7\include\math.h(36): error C2143: syntax error : missing ';' before '{'
c:\Program Files\...\Vc7\include\math.h(36): error C2447: '{' : missing function header (old-style formal list?)
[/code]

Then it complaines about all the functions declared in it.

The offending line:
[code]
extern "C" {
[/code]

What the hell happened? I'm sure I've never opened or changed it, it opened itself with these errors.

Edit: It randomly decided to fix itself, but now it is doing in on assert.h on the same statement. ???
November 22, 2005, 3:03 AM
Kp
Are you using precompiled headers?  I've seen a great many problems in the past brought about by corrupted precompiled headers.
November 23, 2005, 5:08 AM
shout
[quote author=Kp link=topic=13319.msg135101#msg135101 date=1132722515]
Are you using precompiled headers? I've seen a great many problems in the past brought about by corrupted precompiled headers.
[/quote]

Ah. Now that I have disabled them, things are working fine.
November 23, 2005, 6:36 AM

Search