Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Few questions  (Read 3363 times)

0 Members and 1 Guest are viewing this topic.

ThunderManEX

  • Newbie
  • *
  • Posts: 3
    • View Profile
Few questions
« on: January 27, 2011, 10:35:38 am »
I'd prefer not to but I have a few questions to ask, just starting learning from the tutorial and have a couple things I can't figure out.
I'm using the Code::Blocks guidelines btw.

1. I couldn't run the source file here: http://www.sfml-dev.org/tutorials/1.6/window-opengl.php.
First error I get is: | undefined reference to `glClearDepth@8'| followed by 22 more errors that say the same thing regarding gl related code there. Is there any SFML library I need to link? (currently have system, window and graphics linked).

2. For running an executable with SFML code without the use of codeblocks I kept getting this error that said "libgcc_s_dw2-1.dll" is missing but I fixed this for my computer by placing that file in the system32 folder. Am I correct to assume that I would need to distribute that DLL file and some of the SFML 1.6 DLLs along with the executable?

Sorry if this question seems foolish, I'm new somewhat new to programming.

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Re: Few questions
« Reply #1 on: January 27, 2011, 10:44:28 am »
Quote from: "ThunderManEX"
I'd prefer not to but I have a few questions to ask, just starting learning from the tutorial and have a couple things I can't figure out.
I'm using the Code::Blocks guidelines btw.

Ask away! This forum is here so that we can help you ;)
"The one who asks is a fool for 5 minutes, but the one who don't is a fool forever" - Or something like that :P

Quote from: "ThunderManEX"
1. I couldn't run the source file here: http://www.sfml-dev.org/tutorials/1.6/window-opengl.php.
First error I get is: | undefined reference to `glClearDepth@8'| followed by 22 more errors that say the same thing regarding gl related code there. Is there any SFML library I need to link? (currently have system, window and graphics linked).

You seem to need to link opengl too. Don't remember much from my Code::Blocks days but I think you just add "GL" to the library list.

Quote from: "ThunderManEX"
2. For running an executable with SFML code without the use of codeblocks I kept getting this error that said "libgcc_s_dw2-1.dll" is missing but I fixed this for my computer by placing that file in the system32 folder. Am I correct to assume that I would need to distribute that DLL file and some of the SFML 1.6 DLLs along with the executable?

Hmm this is actually not concerned with SFML but MinGW(or whatever win32 unix-environemnt you are using for Code::Blocks) so I don't know how to help you out there, maybe someone else know. Anyway you can just place the dll in the same folder as the exe-file when you distribute it to make sure that it works.
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

tntexplosivesltd

  • Full Member
  • ***
  • Posts: 163
    • View Profile
Re: Few questions
« Reply #2 on: January 27, 2011, 10:51:59 am »
Quote from: "ThunderManEX"

1. I couldn't run the source file here: http://www.sfml-dev.org/tutorials/1.6/window-opengl.php.
First error I get is: | undefined reference to `glClearDepth@8'| followed by 22 more errors that say the same thing regarding gl related code there. Is there any SFML library I need to link? (currently have system, window and graphics linked).

Yes, you need to link to OpenGL. Use -lopengl32.

ThunderManEX

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Few questions
« Reply #3 on: January 27, 2011, 12:25:59 pm »
Quote from: "Groogy"

Ask away! This forum is here so that we can help you ;)
"The one who asks is a fool for 5 minutes, but the one who don't is a fool forever" - Or something like that :P

I'll try to keep that in mind. Thanks for the help. Any general advice you can offer to a beginner in this?
Quote from: "tntexplosivesltd"
Quote from: "ThunderManEX"

1. I couldn't run the source file here: http://www.sfml-dev.org/tutorials/1.6/window-opengl.php.
First error I get is: | undefined reference to `glClearDepth@8'| followed by 22 more errors that say the same thing regarding gl related code there. Is there any SFML library I need to link? (currently have system, window and graphics linked).

Yes, you need to link to OpenGL. Use -lopengl32.

Thank you, that got rid of most of the errors but still left one I managed to solve through google. -lglu32 was also necessary, shouldn't that be pointed out in the tutorial?

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Re: Few questions
« Reply #4 on: January 27, 2011, 12:48:08 pm »
Quote from: "ThunderManEX"
Quote from: "Groogy"

Ask away! This forum is here so that we can help you ;)
"The one who asks is a fool for 5 minutes, but the one who don't is a fool forever" - Or something like that :P

I'll try to keep that in mind. Thanks for the help. Any general advice you can offer to a beginner in this?


One advice: When in doubt, experiment. If you wonder "How does this work?" Just create a quick little project, compile and run and see what happens. The worst thing that could happen is... well nothing really.. you can't physically damage your computer :P
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

tntexplosivesltd

  • Full Member
  • ***
  • Posts: 163
    • View Profile
Few questions
« Reply #5 on: January 27, 2011, 11:12:21 pm »
Ah, yes, forgot about the -lglu32 part, didn't realise the tutorial used gluPerspective (I tend to use glFrustum). It should be pointed out in the tutorial, but it is only needed for Windows. You don't need to link to them under Linux.

 

anything