Can i run OPENGL code from dev-c++

Started by
11 comments, last by joeyzt 20 years, 9 months ago
HI, I''ve decided to learn opengl. And i''m wanting to know if i can run it in dev-c++.? Also, take a simple opengl prog like this, http://www.eecs.tulane.edu/www/Terry/OpenGL/Simple_Example.html#A%20Simple%20Example it has the header file #include <gltk.h> which dev-c++ doesnt have, so whats the standard thing to do if you dont have a header file, is there a site that stores these? thanks.
'A library consists of the actual binary code behind the API. You link your game code to the library to make everything work.'
Advertisement
Yes, you can make opengl programs with dev-c++. I don''t know about that header file though

My Site
gltk.h is not a standard OpenGL header.

Since Dev C++ is built on top of GCC, you should be able to run anything you did in GCC.

That header has come from a custom package, so if you can find out where it came from, you might find a Dev C++ version of the library.

Check out http://nehe.gamedev.net/ for some great OpenGL tutorials. They all work in Dev C++.

EDIT: It looks like you are using Mesa OpenGL. Dev C++ comes with the standard OpenGL library. Try replacing gltk.h with gl/gl.h and gl/glu.h. You just have to use the OpenGL template and it will automatically include the GL libraries.


First make it work,
then make it fast.

--Brian Kernighan

"I’m happy to share what I can, because I’m in it for the love of programming. The Ferraris are just gravy, honest!" --John Carmack: Forward to Graphics Programming Black Book

[edited by - CaptainJester on July 7, 2003 8:45:58 AM]
"None of us learn in a vacuum; we all stand on the shoulders of giants such as Wirth and Knuth and thousands of others. Lend your shoulders to building the future!" - Michael Abrash[JavaGaming.org][The Java Tutorial][Slick][LWJGL][LWJGL Tutorials for NeHe][LWJGL Wiki][jMonkey Engine]
ok,

I''m on the first windows tutorial on the http://nehe.gamedev.net site.

seem to be missing the #include <gl\glaux.h> header now,

any ideas ?
'A library consists of the actual binary code behind the API. You link your game code to the library to make everything work.'
Unfortunatly, the first few tutorials were made when glaux was in use. You will have to do a search to find the glaux libraries.





First make it work,
then make it fast.

--Brian Kernighan

"I’m happy to share what I can, because I’m in it for the love of programming. The Ferraris are just gravy, honest!" --John Carmack: Forward to Graphics Programming Black Book
"None of us learn in a vacuum; we all stand on the shoulders of giants such as Wirth and Knuth and thousands of others. Lend your shoulders to building the future!" - Michael Abrash[JavaGaming.org][The Java Tutorial][Slick][LWJGL][LWJGL Tutorials for NeHe][LWJGL Wiki][jMonkey Engine]
Depends how smart and resourceful you are.

well i found one on google whether its up to date or not i dont know, but i get loads of errors when i run the furst tutorial such as,


[Linker error] undefined reference to `glViewport@16''

[Linker error] undefined reference to `glMatrixMode@4''
'A library consists of the actual binary code behind the API. You link your game code to the library to make everything work.'
Hmm, perhaps you aren''t linking the OpenGL libraries.

How appropriate. You fight like a cow.
In linker options add -lopengl32 -lglu32
Chess is played by three people. Two people play the game; the third provides moral support for the pawns. The object of the game is to kill your opponent by flinging captured pieces at his head. Since the only piece that can be killed is a pawn, the two armies agree to meet in a pawn-infested area (or even a pawn shop) and kill as many pawns as possible in the crossfire. If the game goes on for an hour, one player may legally attempt to gouge out the other player's eyes with his King.
quote:Original post by CaptainJester
Since Dev C++ is built on top of GCC, you should be able to run anything you did in GCC.


<SPAN CLASS=editedby>[edited by - CaptainJester on July 7, 2003 8:45:58 AM]</SPAN>


Technically that not accurate. DevC++ by, default, uses MingW as its compiler. Although MingW is the windows port of GCC.

This topic is closed to new replies.

Advertisement