Skip to main content
gamedev.net
🔒 Locked

errors...

Started by neonoblivion Sep 27, 2002 at 3:56 AM 6 replies 700+ views
Original Post
neonoblivion
neonoblivion
why do I get these errors they seem to pop up when I change the lay out of my headers or includes --------------------Configuration: openglgame - Win32 Debug-------------------- Compiling... main.cpp c:\program files\microsoft visual studio\vc98\include\oleidl.h(3109) : error C2059: syntax error : ''constant'' c:\program files\microsoft visual studio\vc98\include\oleidl.h(3109) : error C2238: unexpected token(s) preceding '';'' c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1158) : error C2143: syntax error : missing '')'' before ''constant'' c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1158) : error C2143: syntax error : missing '';'' before ''constant'' c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1158) : fatal error C1004: unexpected end of file found Error executing cl.exe. openglgame.exe - 5 error(s), 0 warning(s) they don''t have any real relavince since it''s the same ones every time Please help, Klaus
neonoblivion
neonoblivion
it also messes up if i changes any of the defines

#include <windows.h>
#include <mmsystem.h>

#include <GL\Gl.h>
#include <GL\glu.h>
#include <GL\glaux.h>

#include <dsound.h>

#include <iostream.h>
#include <conio.h>
#include <stdio.h>
#include <time.h>
#include <string.h>
#include <math.h>



#include "header.h"


#define width 800
#define height 600
#define bpp 16


#define WINDOW_CLASS_NAME "WINXCLASS"

#define KEY_DOWN(vk_code) ((GetAsyncKeyState(vk_code) & 0x8000) ? 1 : 0)
#define KEY_UP(vk_code) ((GetAsyncKeyState(vk_code) & 0x8000) ? 0 : 1)

Jan Wassenberg
Jan Wassenberg
The flagged header lines look harmless in my VC++ 6 headers.

1) is header.h precompiled? If so, it needs to be first!
2) have you changed any headers?
3) you''re linking with dxguid.lib, right?
E8 17 00 42 CE DC D2 DC E4 EA C4 40 CA DA C2 D8 CC 40 CA D0 E8 40E0 CA CA 96 5B B0 16 50 D7 D4 02 B2 02 86 E2 CD 21 58 48 79 F2 C3
Basiror
Basiror
what does the header.h contain?
http://www.8ung.at/basiror/theironcross.html
Basiror
Basiror
maybe change the row of the first 2 headers
http://www.8ung.at/basiror/theironcross.html
Jan Wassenberg
Jan Wassenberg
Create a file "precompiled.cpp", which just #includes your header. For all other files in your project, set Project options -> C++ -> Precompiled header to: use "precompiled.h"; set precompiled.cpp to: build "precompiled.h".
Caveat: anything before #include "precompiled.h" in your files is ignored (gotta love MS).

HTH
Jan
E8 17 00 42 CE DC D2 DC E4 EA C4 40 CA DA C2 D8 CC 40 CA D0 E8 40E0 CA CA 96 5B B0 16 50 D7 D4 02 B2 02 86 E2 CD 21 58 48 79 F2 C3

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.