winbase.h(6257) error C2146 syntax error : missing '' before identifier 'SetThread

Started by
2 comments, last by teslaa66 15 years, 6 months ago
Hi im having this error all of a sudden c:\program files (x86)\microsoft visual studio\vc98\include\winbase.h(6257) : error C2146: syntax error : missing ';' before identifier 'SetThreadToken' c:\program files (x86)\microsoft visual studio\vc98\include\winbase.h(6257) : fatal error C1004: unexpected end of file found I have not edited this file at all and suddenly its throwing up this error, i have tried downloading and replacing the winbase.h file but i still get the same error
Advertisement
Chances are that in one of your header files you're missing a semi-colon at the end of class definition.
When you get syntax errors in files you are pretty sure compile (like winbase.h), it's likely not actually in that file.

#include "MyFile.h"
#include <windows.h>

If you include any of your header files before you included Windows, and you are missing a semicolon, or brace, the compiler is still looking for it when it reaches the next file.

Start your search in any files you included before Windows.h, or include Windows.h first and see if the compiler gives you the correct location this time.
-- gekko
I only include windows.h in my main and its the first file that i import

#include <windows.h>
#include <iostream>
#include <glut.h>
#include <math.h>

#include "readbmp.h"
#include "vec3f.h"
#include "terrain.h"
#include "md2loader.h"

This topic is closed to new replies.

Advertisement