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.
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.:
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)
(Each undeclared identifier is reported only once
for each function it appears in.)
any help would be nice
from lesson 12:
#define CDS_FULLSCREEN 4
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++ 220.127.116.11. My “includes” are:
In project>project options>parameters>linker
-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.