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

Author Topic: Setup SFML on VS 2013 professional  (Read 8671 times)

0 Members and 1 Guest are viewing this topic.

Sarbast

  • Newbie
  • *
  • Posts: 18
    • View Profile
Setup SFML on VS 2013 professional
« on: May 12, 2014, 03:59:15 pm »
Hi
its been three days i can't still mange to setup SFML 2.1
please help me

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Setup SFML on VS 2013 professional
« Reply #1 on: May 12, 2014, 04:04:19 pm »
If you downloaded the precompiled libs from the main site they will not work since they are for VS 2012. Either compile SFML yourself or grab the nightlies from here.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

Sarbast

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Setup SFML on VS 2013 professional
« Reply #2 on: May 12, 2014, 04:07:29 pm »
i'm newbie i never used any API before
could please direct me to the tutorial

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10998
    • View Profile
    • development blog
    • Email
Re: Setup SFML on VS 2013 professional
« Reply #3 on: May 12, 2014, 04:19:12 pm »
The CMake tutorial is here.

My Nightly Builds are just like the SFML packages, so you just remove your current libraries and use mine instead.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Sarbast

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Setup SFML on VS 2013 professional
« Reply #4 on: May 12, 2014, 04:32:14 pm »
i downloaded Nightly SFML for x64
but now i have system type error :-\
Error   1       error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'       c:\Users\Sarbast\documents\visual studio 2013\Projects\SFMLs\sfml-graphics-d.lib(sfml-graphics-d-2.dll) SFMLs
 

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10998
    • View Profile
    • development blog
    • Email
AW: Setup SFML on VS 2013 professional
« Reply #5 on: May 12, 2014, 04:35:50 pm »
If you use the 64 bit libraries, you'll also have to use the 64 bit compiler.
If you don't find the setting, google for it. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Sarbast

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Setup SFML on VS 2013 professional
« Reply #6 on: May 12, 2014, 04:42:39 pm »
fixed it
now i have another one
the program can't start because sfml-graphics-2.dll missing from your computer
how can i link the DLL files?
i forgot to add SFML_STATIC :D
well another error  :'(

Error   1       error LNK2001: unresolved external symbol "public: static class sf::Color const sf::Color::Green" (?Green@Color@sf@@2V12@B)     C:\Users\Sarbast\documents\visual studio 2013\Projects\SFMLs\main.obj   SFMLs
Error   2       error LNK2001: unresolved external symbol "public: static class sf::RenderStates const sf::RenderStates::Default" (?Default@RenderStates@sf@@2V12@B)    C:\Users\Sarbast\documents\visual studio 2013\Projects\SFMLs\main.obj   SFMLs
Error   3       error LNK1120: 2 unresolved externals   C:\Users\Sarbast\documents\visual studio 2013\Projects\SFMLs\Debug\SFMLs.exe    1       1       SFMLs
 
« Last Edit: May 12, 2014, 05:20:09 pm by Sarbast »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10998
    • View Profile
    • development blog
    • Email
AW: Setup SFML on VS 2013 professional
« Reply #7 on: May 12, 2014, 05:18:25 pm »
Read the official tutorial. DLLs don't get linked. You just need to copy them next to your executable.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Sarbast

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Setup SFML on VS 2013 professional
« Reply #8 on: May 12, 2014, 05:52:48 pm »
I really tired it won't work :(

magneonx

  • Full Member
  • ***
  • Posts: 141
    • MSN Messenger - magnumneon04@hotmail.com
    • View Profile
Re: Setup SFML on VS 2013 professional
« Reply #9 on: May 12, 2014, 06:01:09 pm »
Hi also encountered that very same error. What I did is that I replaced SFML_STATIC with SFML_DYNAMIC. Currently is still don't know the difference, but I do understand what static and dynamic means but not just on the API building from source stuff. But anyway in case you need help maybe replacing SFML_STATIC with SFML_DYNAMIC should work? It did work for me. I built SFML from source from the very master file in GitHub, I plan to use SFML with Thor.

I hope this helps :)/

Sarbast

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Setup SFML on VS 2013 professional
« Reply #10 on: May 12, 2014, 06:07:05 pm »
it worked magneonx  :o
i want to thank you 1 million times man you saved me  :-*
i was about to give up and start downloading SDL

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10998
    • View Profile
    • development blog
    • Email
Re: Setup SFML on VS 2013 professional
« Reply #11 on: May 12, 2014, 06:13:28 pm »
Those that can read have clearly an advantage... ::)
If you just look at images and randomly type what's written there, you'll obviously run into issues. SFML_STATIC is - what a surprise - for static libraries and as the tutorial states, those are the ones with the -s suffix. So if you define SFML_STATIC and link the ones without the -s suffix, you'll obviously get errors...

SFML_DYNAMIC doesn't exist anymore and as such doesn't need to be specified.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Sarbast

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Setup SFML on VS 2013 professional
« Reply #12 on: May 12, 2014, 07:29:14 pm »
i don't whats the problem with SFML_STATIC;
but here the steps
1-download SFML2.1 at Nightly and extract to c:\data

2-make an empty project and add a source.cpp

3-link C:\data\SFML-VS12x32\include and C:\data\SFML-VS12x32\lib

4- add Add the following libraries for statically
sfml-graphics-s-d.lib
sfml-audio-s-d.lib
sfml-system-s-d.lib
sfml-window-s-d.lib
sfml-network-s-d.lib

Add the following libraries for dynamically

sfml-graphics-d.lib
sfml-audio-d.lib
sfml-system-d.lib
sfml-window-d.lib
sfml-network-d.lib

5- add SFML_STATIC


i don't know whats more i should do :-\

G.

  • Hero Member
  • *****
  • Posts: 1592
    • View Profile

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: Setup SFML on VS 2013 professional
« Reply #14 on: May 12, 2014, 10:07:25 pm »
What is your native language? Just wanted to know in case we go ahead and translate the tutorial into more languages in the future.

I think it is more or less clear from the tutorial that you should select one link type, either static or dynamic, not both. Obviously, you should only define SFML_STATIC if you choose to link statically. It doesn't make sense to define SFML_STATIC if you link dynamically does it? Also, there is no more SFML_DYNAMIC, not for the last 3 years. Not defining SFML_STATIC implies dynamic linking. Whoever suggests defining SFML_DYNAMIC to solve issues just resorted to trial and error rather than trying to understand and systematically solve the problem.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

 

anything