I’m new to OpenGL. I tried to use Bloodshed Dev C++ 4.0 to compile some of the NeHe tutorials but they did not work. Is it because I did not use Microsoft’s VC++ compiler? Is there an alternative to the MVC++ compiler? Thanks in advance.
First of all, download the latest version of Dev-C++ at BloodShed.net . Next, when you download the code from NeHe’s tutorials, scroll to the very bottom, there should be a port to Dev-C++ for most tutorials. And to answer your question, MSVC++ is not required to use OpenGL or the NeHe tutorials.
Well, actually I have downloaded the newest version of DCPP and I have dowloaded the latest updates for the Graphics and Games category for the downloads. For me, I got the DCPP 4 to work with OpenGL and I still yet have to get the new version to work. I link opengl32,glut32,glu32,glut.
I have opened the code from NeHe and it still has the errors having to do with GLut.
what are said errors?
its something about Exit@
i remeber that there is a line of code u can put at the beginning…
[Linker error] undefined reference to `__glutInitWithExit@12'
[Linker error] undefined reference to `__glutCreateWindowWithExit@8'
[Linker error] undefined reference to `__glutCreateMenuWithExit@8'
are you linking your library files? That is what the linker error is 99% of the time. Just go to the project settings and then linking and set glut32.lib in there.
#define GLUT_DISABLE_ATEXIT_HACK
To elaborate on chowe6685’s comment:
GLUT uses a hack to work around a problem with how VC++ handles atexit(). To disable this behaviour, define GLUT_DISABLE_ATEXIT_HACK before including glut.h, i.e.:
#define GLUT_DISABLE_ATEXIT_HACK
#include <GL/glut.h>
thanks alot guys…u can deffinately expect me posting questions around here in the future…lol
bein 13 and all
im having a similar problem, in dev c++ i copy the code from the dev c++ download off of nehe’s web page, then i say compile and run, and it gives me this
146 untitled1.cpp`CDS_FULLSCREEN’ undeclared (first use this function)
146 untitled1.cpp
(Each undeclared identifier is reported only once
146 untitled1.cpp
for each function it appears in.)
any help would be nice
from lesson 12:
#ifndef CDS_FULLSCREEN
#define CDS_FULLSCREEN 4
#endif
thxs for the help, but i checked out lesson 12 and i could not find that, so my program is still not working and im getting tired of trying stuff
Thank you all for help, i’ve got all the tutorials working.
Reply for <help me>:
tutorial 12 works fine on my computer and i have Dev C++ 4.9.8.0. My “includes” are:
#include <stdlib.h>
#include <windows.h>
#include <stdio.h>
#include <gl\gl.h>
#include <gl\glu.h>
#include <gl\glaux.h>
In project>project options>parameters>linker
I have
-lopengl32 -lglu32 -lglaux -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32
And I also placed glaux.dll into the folder with the source to be compiled.
for <help me> again: BTW, u should probably open the project file for the tutorial and check the stuff i wrote about there, because the source does not contain any linking info in it.