🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
Compiling error in windows
Some friends and I were working on a small game for school and we're writing the code with opengl.. problem is that the other coder in the group uses linux and I use XP.. so far we have the game rendering models on his linux machine but the damn thing won't compile in windows at all.. We've been looking on the web for the right header files needed for it for 2.0+ but haven't been able find the correct ones. can anyone tell me where i could find the code/headers needed for it to compile in windows correctly?
We've already gotten started with the coding. All the tutorials assume you already have the header file already. the gl.h file I have gives me around 500 errors when I compile it, I was asking if anyone knew a link to an up-to-date header file
What are the specific errors that you're getting?
Compiler or linker errors?
Are you linking to OpenGL32.lib?
Compiler or linker errors?
Are you linking to OpenGL32.lib?
#ifdef WIN32_NOT_SO_LEAN
#include <windows.h>
#include <GL\gl.h>
#include <gl\glu.h>
#endif
that's what my includes look like, the errors go like this:
In file included from object.h:7,
from model.h:5,
from scene.h:4,
from game.h:4,
from VBOs.cpp:29:
C:/Dev-Cpp/include/GL/gl.h:1573: error: expected constructor, destructor, or type conversion before "void"
C:/Dev-Cpp/include/GL/gl.h:1573: error: expected `,' or `;' before "void"
C:/Dev-Cpp/include/GL/gl.h:1574: error: expected constructor, destructor, or type conversion before "void"
C:/Dev-Cpp/include/GL/gl.h:1574: error: expected `,' or `;' before "void"
C:/Dev-Cpp/include/GL/gl.h:1575: error: `WINGDIAPI' does not name a type
C:/Dev-Cpp/include/GL/gl.h:1576: error: expected constructor, destructor, or type conversion before "void"
after it gets to line 1900 of the gl.h file it starts saying that the functions like glGenTextures and glTexParameterf are undeclared and that continues for the rest of the log.
We (the Linux user and myself) are both using DevC++ as a compiler. I also tried it in VC++ and got the same errors, I found this and tried it http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=356613&SiteID=1 and it still didn't work
Edit: And yes i linked the libraries for OpenGL and glu
#include <windows.h>
#include <GL\gl.h>
#include <gl\glu.h>
#endif
that's what my includes look like, the errors go like this:
In file included from object.h:7,
from model.h:5,
from scene.h:4,
from game.h:4,
from VBOs.cpp:29:
C:/Dev-Cpp/include/GL/gl.h:1573: error: expected constructor, destructor, or type conversion before "void"
C:/Dev-Cpp/include/GL/gl.h:1573: error: expected `,' or `;' before "void"
C:/Dev-Cpp/include/GL/gl.h:1574: error: expected constructor, destructor, or type conversion before "void"
C:/Dev-Cpp/include/GL/gl.h:1574: error: expected `,' or `;' before "void"
C:/Dev-Cpp/include/GL/gl.h:1575: error: `WINGDIAPI' does not name a type
C:/Dev-Cpp/include/GL/gl.h:1576: error: expected constructor, destructor, or type conversion before "void"
after it gets to line 1900 of the gl.h file it starts saying that the functions like glGenTextures and glTexParameterf are undeclared and that continues for the rest of the log.
We (the Linux user and myself) are both using DevC++ as a compiler. I also tried it in VC++ and got the same errors, I found this and tried it http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=356613&SiteID=1 and it still didn't work
Edit: And yes i linked the libraries for OpenGL and glu
You'll need to be more specific. Which compiler are you using (if microsoft visual studio what version/year). We should be able to give you more help with that information.
EDIT: Sorry didn't see the previous info before.
EDIT: Sorry didn't see the previous info before.
Can't speak on behalf of DevC++, but I know this worked for me with express 2005 and 2008
http://saurabhinhyd.wordpress.com/2006/11/30/opengl-and-visual-c-2005-express/
http://saurabhinhyd.wordpress.com/2006/11/30/opengl-and-visual-c-2005-express/
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement