Is there anything that i need for RoD's opengl programing tut that isnt already included in the bloodshed dev-C++ compiler or do i need a differnt compiler all together
Is there anything that i need for RoD's opengl programing tut that isnt already included in the bloodshed dev-C++ compiler or do i need a differnt compiler all together
This has come up before but bears repeating. The tutorial was unfortunately written for msvc++ and #includes one-non-standard, ms specific header that's actually not required for the examples anyway (#include "stdafx.h"). It also uses, again unnecessarily, a #pragma directive(#pragma comment(linker, "/subsystem:windows"). Just remove them and I think you should be okay. If not, post again but please provide either a link to the tutorial in question or post the problematic code.
CProgramming FAQ
Caution: this person may be a carrier of the misinformation virus.
The OpenGL libs aren't "already included" with Dev-C++, at least I don't think they are; you'll have to download them. There's probably a DevPak for OpenGL.
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.
>>The OpenGL libs aren't "already included" with Dev-C++<<
No, opengl libs have been supplied with dev-cpp since at least v4.01(mingw 295.x) - ie. years before the current version.
CProgramming FAQ
Caution: this person may be a carrier of the misinformation virus.
thanks
here's the link to the tut
http://www.cprogramming.com/tutorial...ojections.html
Do i need any libraries and if so were should they be placed?
You only need to link with the required opengl libraries: project menu --> project options, select 'parameters' tab and add the following to the 'linker' field:in the project options dialog.Code:-lopengl32 -lglu32 -lglut -lglaux
edit:
Actually, you'll also need to remove all those #pragma statements. In fact, the opening few lines should look like this:Code:#define WIN32_LEAN_AND_MEAN //#pragma comment(lib, "opengl32.lib") //#pragma comment(lib, "glu32.lib") //#pragma comment(lib, "glaux.lib") //#pragma comment(linker, "/subsystem:windows") //#include "stdafx.h" #include <windows.h> // standard Windows app include //#include <winuser.h> // Windows constants #include <gl/gl.h> // standard OpenGL include #include <gl/glu.h> // OpenGL utilties #include <glut.h> // OpenGL utilties #define WND_CLASS_NAME "OpenGL Window Class"
CProgramming FAQ
Caution: this person may be a carrier of the misinformation virus.