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

Author Topic: ERROR about color  (Read 1580 times)

0 Members and 1 Guest are viewing this topic.

MrMou6

  • Newbie
  • *
  • Posts: 17
    • View Profile
ERROR about color
« on: September 07, 2017, 06:51:00 pm »
Hello. WHy I get this error?
Quote
error LNK2001: unresolved external symbol "public: static class sf::Color const sf::Color::Blue" (?Blue@Color@sf@@2V12@B)
code:
Quote
window.clear(sf::Color::Blue);
« Last Edit: September 07, 2017, 06:56:45 pm by MrMou6 »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: ERROR about color
« Reply #1 on: September 07, 2017, 06:56:58 pm »
Because you defined SFML_STATIC but you're linking SFML dynamically.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

MrMou6

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: ERROR about color
« Reply #2 on: September 07, 2017, 07:07:12 pm »
My bad... Thanks :D

now error its fixed but my screen is not filled with a color :(

Code:
Quote
int main()
{
   sf::RenderWindow langas(sf::VideoMode(800, 600), "SM Bettings");
   
   while (langas.isOpen()) {
      sf::Event ev;
      while (langas.pollEvent(ev)) {

         if (ev.type == sf::Event::Closed)
            langas.close();
         if (sf::Keyboard::isKeyPressed(sf::Keyboard::Escape))
            langas.close();
      }
   }

   langas.clear(sf::Color::Green);
   langas.display();
   return 0;
}

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: ERROR about color
« Reply #3 on: September 07, 2017, 07:10:20 pm »
Check the tutorials again. There's one quite obvious mistake in your code. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

MrMou6

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: ERROR about color
« Reply #4 on: September 07, 2017, 07:31:59 pm »
I found that... Thank you for the help :D

 

anything