VS2010 : syntax error in sourceannotations.h !!

Hi all, I have got this error :

c:\program files (x86)\microsoft visual studio 10.0\vc\include\codeanalysis\sourceannotations.h(29): error C2144: syntax error : '__w64 unsigned int' should be preceded by ';'
c:\program files (x86)\microsoft visual studio 10.0\vc\include\codeanalysis\sourceannotations.h(29): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

I am working with VS2010 and sourceannotations.h belongs to it !!!

The code around line 29 is
1
2
3
4
5
6
7
8
#ifndef _SIZE_T_DEFINED
#ifdef  _WIN64
typedef unsigned __int64    size_t;
#else
typedef _W64 unsigned int   size_t;
#endif
#define _SIZE_T_DEFINED
#endif 


I am working on a 64 bits laptop to build a 32 bits application. What have I done wrong ?

TIA
Jean

PS I tried to 'preview' this message but got a blank page !!
The source of your problems are certainly somewhere within your code (the standard header certainly don't have error because they are uses a million times).

Possible problems in your code:

- Missing semicolon
- Missing or wrongfull brace. One of either () or {}
- A stray [invisible] character somerwhere
- An invalid macro (#define)

Sometimes deleting all generated file (especially .sdf) may help if there is no such error.
The error message clearly indicates that line 29 (line 5 of your snippet) should be proceeded by a semicolon. Presumably, you are not including sourceannotations.h directly, but it is included by some other standard header. You're going to have to back up through the layers of headers to find the header that you included that then includes sourceannotations.h. Your missing semicolon should be immediately before the inclusion of that top level header. Going into project properties, under C/C++ -> Advanced, you can set SHOW INCLUDES. That may help.

Although it may be simpler to check the line before every #include for a semicolon.

My guess is you have a class declaration (missing a semicolon) followed by a #include of a standard header.

1
2
3
4
5
class someclass
{
...
}    // <- missing semicolon
#include <some-std-header> 


As it is an old code already built a hundred time (well it's less than one million ;-) ) but copied on a new laptop via SVN, the first thing I'll try is to delete the .sdf files ...

As I am away tomorrow, I'll try that on monday.

Thanks and have a good week-end
Jean
Hi, I come back on this topic. I think the problem is that _W64 is not defined.

I went on all the layers. I saw that _W64 is defined as __w64 but I am unable to see where __w64 is defined.

Have you an Idea ?

Jean

PS As I don't know if 'old' posts are read, I pot a new one about __w64 ...
You do not need to repeat the same question on your other thread.
If your old problem is solved, please mark this thread as solved.

Topic archived. No new replies allowed.