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

Author Topic: undefined refernece to 'glClearColor@16'  (Read 3068 times)

0 Members and 1 Guest are viewing this topic.

apollo11bb

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
undefined refernece to 'glClearColor@16'
« on: March 27, 2020, 08:13:36 am »
so heres the deal- I just actually downloaded SFML. And as usual something goes wrong- I ran the test and straight into the "undefined reference" devil. Got this message:"undefined reference to 'glClearColor@16'".

Im using codeblocks.

I would really appreciate the help!

thx in advance!
« Last Edit: March 27, 2020, 08:16:42 am by apollo11bb »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10818
    • View Profile
    • development blog
    • Email
Re: undefined refernece to 'g1Clear@4'
« Reply #1 on: March 27, 2020, 08:17:28 am »
You need to link OpenGL as described in the tutorial. ;)

A quick search should've given you similar answers as it's a rather common problem that people run into.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

apollo11bb

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
Re: undefined refernece to 'glClearColor@16'
« Reply #2 on: March 27, 2020, 11:10:29 pm »
Im still having the same problem. but the thing is that Im running on windows, and the tutorial says that all should be included.

im sure im doing something wrong... just cant figure it out

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10818
    • View Profile
    • development blog
    • Email
Re: undefined refernece to 'glClearColor@16'
« Reply #3 on: March 28, 2020, 12:11:26 pm »
If you need further help, you do have to provide more information. "Doesn't work" is not a problem description. ;)

https://www.sfml-dev.org/faq.php#tr-grl-verbose-ide
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

apollo11bb

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
Re: undefined refernece to 'glClearColor@16'
« Reply #4 on: March 29, 2020, 03:08:34 am »
ok, I found a youtube video on the sfml setup. and it didn't work. I got the same "undefined reference to..." message. Then I figured, Ill try some other way. So I found another video on sfml setup... still the same message. I figured maybe I should try my own way (I followed the SFML Tutorial from SFML.com) still the same- "undefined reference to 'glClear@4'" and "undefined reference to 'glClearColor@16'".  :-\

I honestly have no idea where Im going wrong. ive started working with GLUT, but to be fully honest, I really want to work with SFML.

apollo11bb

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
Re: undefined refernece to 'glClearColor@16'
« Reply #5 on: March 30, 2020, 09:02:39 pm »
You need to link OpenGL as described in the tutorial. ;)

A quick search should've given you similar answers as it's a rather common problem that people run into.

thank you so much I got it finally!  :D

 

anything