[done] [Code::Blocks] NewLesson01 to Empty Project

Started by
4 comments, last by NeilRoy 13 years ago
Hey Guys!
First I want to say sorry for this post, because it seems to be a very 'nooby' question. Unfortunately there was no way I found, to solve this Problem on my own.
The next thing to clarify: SDL seems to be installed quite right. When I download Lesson01 (http://nehe.gamedev.net/wiki/NewLesson1.ashx), open and rebuild it everything works fine.
And now my problem: As soon as I create a new "Empty Project" and add all the files that were in the Lesson01-Project I get a lot of Errors. (The Files in the new Project have the same Directory Structure as in the original Lesson01)


Some of the 33 Errors I get:
undefined reference to `glClear@4'
undefined reference to `glLoadIdentity@0'
undefined reference to `glViewport@16'


Obviously there are some settings I have to set. But I'm not able to figure them out.
It would be wonderful if you can help me!

[Edited by - Annoanno on October 5, 2010 12:53:00 PM]
Advertisement
You'll need to link to the appropriate libraries, probably OpenGL32.lib, Glu32.lib, SDL.lib and SDLmain.lib.
Thanks for the rapid answer. I'll try it.

Here is the website I followed to use SDL in CodeBlocks. I took the solution named "The Good". http://wiki.codeblocks.org/index.php?title=Using_SDL_with_Code::Blocks

OK, I got one fault I did. I didn't copied the include-folder of the SDL-SDK into the include-folder of MinGW.

Now there aren't any Link-Errors regarding SDL.

[Edited by - Annoanno on October 5, 2010 12:50:29 PM]
Sorry but I don't get the problem!
I copied the include- and lib-files from the SDL-SDK into MinGW, so I don't have to set any Linker-Settings in CodeBlocks. This works pretty fine, there are no errors about that.

But now GL is freaking out, even if this files are available by default?!
Thank you very much. Even if I didn't believe you, you were right. But this means that the instructions on "http://wiki.codeblocks.org/index.php?title=Using_SDL_with_Code::Blocks" are wrong?!
I recommend Taking your project that worked, and deleting some of the code so you have just some basic stuff in there you will use for most any project. Then save it as a template so you can use it to create new projects in the future that are already set up to work properly.

This topic is closed to new replies.

Advertisement