sourceannotations.h

Please help me. I've been working on OpenGL, doing tutorials at my friend's house. When I got home, I had to install the glaux lib onto my computer. I did so, and the computer gave me an error on sourceannotations.h

(Here is the compile)


1>------ Build started: Project: Asylum, Configuration: Debug Win32 ------
1>Compiling...
1>Source.cpp
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(19) : error C2144: syntax error : '__w64 unsigned int' should be preceded by ';'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(19) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>Build log was saved at "file://c:\Users\Jake\Documents\Visual Studio 2008\Projects\Asylum\Asylum\Debug\BuildLog.htm"
1>Asylum - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

please tell me if you know how to deal with this. Please email me at tillo0125@gmail.com if you can
There's not enough information here. Show some of the code around the line where the error occurs.
ok, ill show the code around the line

(the error is on line 19)

#if _MSC_VER >= 1400

#pragma once

#ifndef _M_CEE_SAFE // Source annotation attributes don't work with /clr:safe

#if !defined(_W64)
#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
#define _W64 __w64
#else
#define _W64
#endif
#endif

#ifndef _SIZE_T_DEFINED
#ifdef _WIN64
typedef unsigned __int64 size_t;
#else
typedef _W64 unsigned int size_t;
#endif
#define _SIZE_T_DEFINED
#endif

#ifndef _WCHAR_T_DEFINED
typedef unsigned short wchar_t;
Please use code tags in the future, especially when line numbers are important. What macros are defined when you are compiling it?
macros?
_MSC_VER, _W64, __midl, etc.
oh ok, _W64, thats all im aware of
and MSC, plus WIN64
Does _W64 get defined as __w64 or nothing?

The reason I ask this is so I can see what's actually getting through to the compiler.
its defined as (_W64)
Last edited on
The error you're getting makes me suspect a syntax error somewhere, and I was seeing if I could narrow down what parts to look at. The compiler was having problems with line 19, where size_t was being typdef'd, but I don't see any code above it that could cause a syntax error and what you've posted so far compiled fine for me.
well, it compiles in the tutorial files, so i assume the .bmp file isnt loading
but i cant pinpoint where it locks onto the file. i just need help finding that and i think it's fixed.
well, i can't fix it, i'm outta ideas. can u help zhuge?
What bmp file? Where did that come from?
that is in the original package it came in. the tutorial was a .rar archive that had the script, and a data file. the program loads a 3d world and allows you to move thorugh it
Is this legal code though?
typedef _W64 unsigned int size_t;

Reading on Microsoft's website, this is the proper use of it:
Microsoft wrote:
type __w64 identifier


So I believe it should be written:
typedef unsigned int _W64 size_t;

Also, I'm sure you're aware, and probably have one, but this code is only for 64 bit systems, unless I'm mistaken.
Last edited on
Topic archived. No new replies allowed.