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

Author Topic: VS 2017 and SFML  (Read 2858 times)

0 Members and 1 Guest are viewing this topic.

Takao95

  • Newbie
  • *
  • Posts: 6
    • View Profile
VS 2017 and SFML
« on: September 13, 2017, 09:20:09 pm »
Hi everyone,
I'm using Visual Studio Community 2017 and i have some problem with SFML, i have downloaded the Nightly build but it don't work and give me a lot of error ( I follow the guide in the Learn section of SFML site)... So someone could help me?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10998
    • View Profile
    • development blog
    • Email
Re: VS 2017 and SFML
« Reply #1 on: September 13, 2017, 10:19:05 pm »
How should someone help you if you don't describe your problem?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Takao95

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: VS 2017 and SFML
« Reply #2 on: September 13, 2017, 10:28:47 pm »
So... My problem is this and i have a lot of other error like those...

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10998
    • View Profile
    • development blog
    • Email
Re: VS 2017 and SFML
« Reply #3 on: September 13, 2017, 11:24:15 pm »
You're mixing debug libraries with release mode or release libraries with debug mode.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Takao95

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: VS 2017 and SFML
« Reply #4 on: September 14, 2017, 08:53:36 am »
Perfect, this has solved many problems, but many of these ...
I forgot to mention that the settings have been configured for a win 32 platform ...

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10998
    • View Profile
    • development blog
    • Email
Re: VS 2017 and SFML
« Reply #5 on: September 14, 2017, 09:06:12 am »
When you link statically you need to link SFML's dependencies, as described in the tutorial, e.g. linking OpenGL.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Takao95

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: VS 2017 and SFML
« Reply #6 on: September 14, 2017, 09:25:15 am »
But i already add SFML_STATIC in preprocessor option and i link the debug and the release library

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10998
    • View Profile
    • development blog
    • Email
Re: VS 2017 and SFML
« Reply #7 on: September 14, 2017, 10:02:24 am »
The magic word is: dependencies

Check the tutorial again , especially the section on static linking and make sure you're not looking at an old tutorial.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Takao95

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: VS 2017 and SFML
« Reply #8 on: September 14, 2017, 10:36:14 am »
OK, i do what you tell me and infact a lot of error disappear but i still have these two error.
I add: sfml-graphics-d.lib
sfml-window-d.lib
sfml-system-d.lib

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10998
    • View Profile
    • development blog
    • Email
Re: VS 2017 and SFML
« Reply #9 on: September 14, 2017, 10:59:00 am »
So why do you link dynamic libraries if you want to link things statically?

Either pick static or dynamic and follow all the steps for it in the tutorial.

-s suffix is for static
none -s suffix is for dynamic

SFML_STATIC needs to be defined for static
not so for dynamic

dependencies need to be linked for static
not so for dynamic

It's all in the tutorial, one just has to read carefully. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Takao95

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: VS 2017 and SFML
« Reply #10 on: September 14, 2017, 11:19:03 am »
Ok, it work i should have read more carefully.
Thank you very much

 

anything