Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: Madhatt3r on September 29, 2006, 07:56:35 am

Title: Open Gl Help.
Post by: Madhatt3r on September 29, 2006, 07:56:35 am
Okay I've been trying to start learning opengl for quite some time now. I've been trying to learn it from this book I bought that uses OpenGl and Glut. However though no matter what I try nothing will compile. I've google OpenGl and Compileing it a million times and have tried a couple of different things but the program always gives me errors. What I am asking for and I know this is a alot but will someone give me alittle help and get me started. Give me a list of maybe things I could be  doing wrong? I'm running Windows Xp I've installed the .libs and all the other stuff a couple of times and nothing. Please I know this is asking alot someone please give me alitte guide on how to install Code::Blocks with or add the correct files and what not to get openGL to compile..

Thanks.
Title: Re: Open Gl Help.
Post by: MortenMacFly on September 29, 2006, 08:14:35 am
Please I know this is asking alot someone please give me alitte guide on how to install Code::Blocks with or add the correct files and what not to get openGL to compile..
There is not much to do: Install the MinGW compiler framework and the MinGW GLUT library. Then setup your project's include path and libs accordingly. BTW: Did you try the OpenGL / GLUT wizard that ships with C::B? They do this for you and should work right-out-off-the-box.
Anyway: What does the compiler complain? What are the errors? It's much easier to help if you post the compile log (see my sig).
With regards, Morten.
Title: Re: Open Gl Help.
Post by: Madhatt3r on September 30, 2006, 05:00:31 am
Ok everytime I compile I get this error no matter what..

Error:
Code
Switching to target: default
Compiling: main.cpp
In file included from main.cpp:1:
C:\Documents and Settings\Jase\Desktop\Source Code\Chapter01\Simple\glut.h:50: error: redeclaration of C++ built-in type `short'
Process terminated with status 1 (0 minutes, 0 seconds)

Part of code I am having trouble with:

Code
 typedef unsigned short wchar_t;
Title: Re: Open Gl Help.
Post by: bluekid on September 30, 2006, 02:08:42 pm
http://forums.codeblocks.org/index.php?topic=2656.0