Sign in to follow this  
teslaa66

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

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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"

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this