|
From: Yeoh H. <ye...@ye...> - 2002-11-12 04:11:51
|
Hi Samuel, This is also my first try at OpenGL. :-) Your code does compile but first you need some changes. Here's how I did it. I created a new OpenGL project using Dev-C++ 4.9.6.8. Select the OpenGL template, and Dev-C++ creates the application. Then I remove the template source file and created a new blank file. I copy and pasted your example code into the editor and made some changes to the first four lines. Here it is: #include <windows.h> #include <gl/gl.h> #include <gl/glut.h> I've deleted #include <cstdlib>. You see that I've included the Windows header file and the glut header file. The rest of the code I leave untouched. Then, in the Project Option dialog, Linker Options/Optional Libs or Object files: The textbox should show: -lopengl32 -lglut32 I've added -lglut32. The program now compiles without any errors. But when I try to run it, there's an error. A required DLL file, GLUT32.DLL was not found. I ran a search but couldn't find glut32.dll anywhere in my harddisks. So I did an google search and found this site: http://www.xmission.com/~nate/glut.html The DLL is found in here: http://www.xmission.com/~nate/glut/glut-3.7.6-bin.zip The program now does run. :-) Hope this helps. Thanks and Regards, Yeoh ~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~ http://www.yeohhs.com ~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~ ----- Original Message ----- From: "Samuel Keding" <big...@ya...> To: <dev...@li...> Sent: Tuesday, November 12, 2002 10:52 AM Subject: [Dev-C++] openGl > This is my first OpenGL. I'm using the book OpenGL > Programming Guide which uses C, but I'm using C++. I > tried to compile the following program in Dev. It > brings up hundreds of compiler errors. I believe it is > a left out include file or a missing linker switch. > Sorry if it seems obvious but this is my first try at > OpenGL. Here is the code: <snipped> |