Jump to content

  • Log In with Google      Sign In   
  • Create Account


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


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 Annoanno   Members   -  Reputation: 100

Like
0Likes
Like

Posted 05 October 2010 - 05:28 AM

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]

Sponsor:

#2 Gage64   Members   -  Reputation: 1227

Like
0Likes
Like

Posted 05 October 2010 - 05:41 AM

You'll need to link to the appropriate libraries, probably OpenGL32.lib, Glu32.lib, SDL.lib and SDLmain.lib.

#3 Annoanno   Members   -  Reputation: 100

Like
0Likes
Like

Posted 05 October 2010 - 05:50 AM

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]

#4 Annoanno   Members   -  Reputation: 100

Like
0Likes
Like

Posted 05 October 2010 - 06:19 AM

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?!

#5 Annoanno   Members   -  Reputation: 100

Like
0Likes
Like

Posted 05 October 2010 - 06:52 AM

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?!

#6 Neil A Roy   Members   -  Reputation: 102

Like
0Likes
Like

Posted 30 March 2011 - 07:49 PM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS