SFML community forums

General => General discussions => Topic started by: Fitzy on September 19, 2013, 03:11:31 am

Title: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: Fitzy on September 19, 2013, 03:11:31 am
Visual Studio 2013 Binaries + Source

Download: https://dl.dropboxusercontent.com/u/88413086/SFML-2.1-VS2013-RC.rar (https://dl.dropboxusercontent.com/u/88413086/SFML-2.1-VS2013-RC.rar)
There we be an installation tutorial for this setup at the bottom of the post.

Here are the Binaries for VS2013 RC, this will also work for VS2013 Preview.
I had to make some changes to the static libraries because CMake was giving
me errors linking the 'libs' incorrectly causing syntax errors "&quot".
The way to bypass this issue was to link the libs for static builds implicitly like:

Quote
#ifdef SFML_STATIC
#pragma comment(lib, "glew.lib")
#pragma comment(lib, "freetype.lib")
#pragma comment(lib, "jpeg.lib")
#pragma comment(lib, "opengl32.lib")
#pragma comment(lib, "winmm.lib")
#pragma comment(lib, "gdi32.lib") 
#endif // SFML_STATIC

As long as SFML_STATIC is in the pre-processor in the project settings for the static build
these libs will link flawlessly. I know it's bad practice but I find explicitly calling them like this
much cleaner and the programmer can see exactly what's happening in their project.
THIS IS PURELY MY OWN OPINION AND YOU ARE NOT EXPECTED TO FOLLOW MY VIEWS

Visual Studio 2013 RC Template

Download: https://dl.dropboxusercontent.com/u/88413086/SFML%20Game%20Template.rar (https://dl.dropboxusercontent.com/u/88413086/SFML%20Game%20Template.rar)

This template has the above SFML_STATIC code snippet and the official SFML code snippet from the
official green circle installation test code.

Installation Instructions

Make sure you're using Visual Studio 2013 Preview or RC(Release Candidate) and Winrar!

1. Start by extracting the Binaries folder to your C:/ drive.
    So it appears like this: C:\SFML\SFML-2.1
    IT IS IMPORTANT YOU COPY IT TO THE C:/ OTHERWISE THE PROJECT SETTINGS WILL BE MESSED UP!

2. Then extract the template file to your Visual Studio path Microsoft Visual Studio 12.0\VC\vcprojects
    Mine appears like: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcprojects
    It should now have a new folder in there named SFML Game and inside the folder it should have the files.

3. Now go to the C:\SFML\SFML-2.1 folder and open the bin folder, you should see loads of .dll files, this is perfect!
    We need to copy all of these .dll files and copy them into the Visual Studio 2013 bin folder so when we
    run our project it will be able to find the runtime components our program needs to run!
   
    Copy all of those .dll files to: Microsoft Visual Studio 12.0\VC\bin
    Again, mine looks like this: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin

Now fire up Visual Studio 2013 and start a new project, click on Visual C++, you should now see SFML Game!
Open this and open SFML Game project file and call it what you like. You should now see the following:

Quote
#ifdef SFML_STATIC
#pragma comment(lib, "glew.lib")
#pragma comment(lib, "freetype.lib")
#pragma comment(lib, "jpeg.lib")
#pragma comment(lib, "opengl32.lib")
#pragma comment(lib, "winmm.lib")
#pragma comment(lib, "gdi32.lib") 
#endif // SFML_STATIC


#include <SFML/Graphics.hpp>

//Default test code from the SFML website
int main()
{
   sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
   sf::CircleShape shape(100.f);
   shape.setFillColor(sf::Color::Green);

   while (window.isOpen())
   {
      sf::Event event;
      while (window.pollEvent(event))
      {
         if (event.type == sf::Event::Closed)
            window.close();
      }

      window.clear();
      window.draw(shape);
      window.display();
   }

   return 0;
}

You now have 4 compiling options.

Try each of these settings and build the sample code, vuala! We hopefully have lift off!

Small edit to correct the version, it's SFML 2.1! not 2.0 - Sorry.
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: georgewbw on October 09, 2013, 08:11:49 pm
Logged in to let you know your project template is working. Thank you for sharing, you saved me some time (:
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: Unreliable on October 29, 2013, 03:47:35 pm
Followed your instructions and it worked perfectly! Thanks so much!
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: sylvain on November 11, 2013, 10:11:15 am
I followed the instructions, and it works with debug static / release / release static.
However, in debug mode I get an error message: "Unable to start program 'C:\Users\Sylvain\Documents\Visual Studio 2013\Projects\SFMLGame1\Debug\SFMLGame1.exe'.  The system cannot find the file specified."
Do you know why? Thanks

Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: JGrieco42 on November 15, 2013, 12:47:43 am
I struggled a ton with VS2013 today, probably wasted almost 2 hours on this.  Your template is amazing, can't thank you enough!
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: eXpl0it3r on November 15, 2013, 08:24:22 am
I followed the instructions, and it works with debug static / release / release static.
However, in debug mode I get an error message: "Unable to start program 'C:\Users\Sylvain\Documents\Visual Studio 2013\Projects\SFMLGame1\Debug\SFMLGame1.exe'.  The system cannot find the file specified."
Do you know why? Thanks
He probably set a different path for execution and for building the binary, just go through the settings and make sure the path point to the same location. ;)
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: Grimlen on November 18, 2013, 08:09:34 pm
Can someone help?
I did everything he said, I downloaded the template as well.
Opened it up, it ran completely fine in both Debug and Release.

However I have a problem.
I'm trying to make a WIN32 project and getting VS 2013 to work with SFML 2.1.

I can't get it to work with a WIN32 project.
I'm not sure what else he has in the templates property pages.
The only difference I found was the includes:

C:\SFML\SFML-2.1\include;%(AdditionalIncludeDirectories)
C:\SFML\SFML-2.1\Libs\Release;%(AdditionalLibraryDirectories)

I'm simply trying to get the Audio portion of SFML working with Visual Studio 2013 Ultimate edition.

Now seeing that the template project works smoothly, this shows that I've successfully copied the SFML dlls to the VC/bin folder correctly.

The WIN32 project just doesn't work.
Here are the libs I've included in my win32 project property pages:
sfml-system-d.lib;sfml-window-d.lib;sfml-audio-d.lib;

When I try to build and run it, I get an error:

"The program can't start because MSVCP110D.dll is missing from your computer. Try reinstalling the program to fix this problem."

I'm unsure of why I'm getting this error.
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: zsbzsb on November 18, 2013, 09:41:31 pm
No need to post in two different places as you did in this thread (http://en.sfml-dev.org/forums/index.php?topic=13549.msg95302#msg95302). Your problem might be coming from the fact that the OP was built using VS 2013 RC, not the actual release of VS 2013. What I suggest you do is follow the official tutorials (http://www.sfml-dev.org/tutorials/2.1/) to build SFML from the source using your compiler.
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: Fitzy on November 22, 2013, 04:29:50 pm
No need to post in two different places as you did in this thread (http://en.sfml-dev.org/forums/index.php?topic=13549.msg95302#msg95302). Your problem might be coming from the fact that the OP was built using VS 2013 RC, not the actual release of VS 2013. What I suggest you do is follow the official tutorials (http://www.sfml-dev.org/tutorials/2.1/) to build SFML from the source using your compiler.

That's not the issue, I'm using my same method on the full release of VS2013 the template I provided was for a console application. I should have mentioned this I'm really sorry to have wasted your time. It's probably best to do what zsbzsb said and just rebuild the source with CMake and follow the install guide on this site.

My method was just meant to be a shortcut to save time on the VS2013 RC but works on VS2013 Ultimate too.
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: Xafi on November 29, 2013, 01:22:20 pm
Working
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: clark on January 12, 2014, 08:04:32 pm
Hey everyone.

There is a few threads about this, I have seen the CMake tutorial and things start to break down a little. I am new to C++ / Visual Studio / SFML and the additional build step is tripping me up.

I see there is VS10 and VS11 does anyone know when there will be an official VS12 build for download?
Title: AW: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: eXpl0it3r on January 12, 2014, 08:27:43 pm
With SFML 2.2 which will be released when the iOS and Android bits are tested enough and stable enough.
An ETA? SOON (TM)! ;)
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: clark on January 12, 2014, 08:33:07 pm
Thanks for that mate!  Still getting the layout of the land. I will look forward to 2.2 :D Think I might try VS11 in the mean time. Lol, my boss got the response "SOON" on Friday, I am down with that timeframe.
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: Nexus on January 12, 2014, 08:37:15 pm
Think I might try VS11 in the mean time.
http://en.sfml-dev.org/forums/index.php?topic=14105.msg98831#msg98831
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: Mustache on January 14, 2014, 12:33:37 pm
I've been stopped game programming because there was no nice template. Because my lazy butt I did not see this topic! Thank you so much, I'm back programming games. :D
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: Oli_Mo on January 29, 2014, 10:54:57 am
All I want to say to the thread starter: <3

I really love to use VS2013 and I like to be up to date on IDEs.
Thx, you made my day.

Of course a big thanks to Laurent, I'm a big fan of yours
and I'm pretty thankful for this nice project you created.

Greetz, Mo
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: Skyler on February 07, 2014, 09:06:40 am
Could I get some help installing this? Firstly, I don't have this exact path Microsoft Visual Studio 12.0\VC\vcprojects, The part I don't have is vcprojects. I tried making my own folder called that and extracting the template file to there but it didn't work. There are other folders in Microsoft Visual Studio 12.0\VC\vcprojects called VC ProjectDefaults, VCProjectItems_WDExpress, vcprojects_WDExpress, vcprojectitems, would I put it in any of those? For now i tried putting it in vcprojects_WDExpress and SFML Game Does show up in the Visual C++ Template when creating a new project. I opened it up but I don't see the code that he showed in the quote. I've been learning to program in C++ for the past month but I haven't had to add new libraries or templates yet. To be honest even with this tutorial I have no idea what I'm doing. Could someone please help me get this running? I will attach a picture of my VC Directory.
Much appreciated.
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: eXpl0it3r on February 07, 2014, 09:13:52 am
You should rather follow the tutorials and learn how to set things up on your own. Sooner than later you'll have to learn it anyways. Plus it's also a good idea to build directly from source with CMake, so you get to learn that as well. Building and linking libraries is one of the most important things in programming. ;)
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: georger on February 17, 2014, 05:04:49 pm
Could I get some help installing this?
08/09/2014 UPDATE: The template's Post-Build Event was updated to copy the SFML DLLs to $(OutDir) rather than to $(SolutionDir)$(Configuration)\. The rationale is that if you changed the Output Directory from $(SolutionDir)$(Configuration)\ to some other folder, the Post-Build Event would still copy the DLLs to $(SolutionDir)$(Configuration)\ rather than to your custom output folder. Fixed.

In order to make things easier, I took a shot at doing a bundle (VS2013 binaries + template) that is simpler to install and use. Here are the steps:

BINARIES
1) Download the binaries from here (https://www.dropbox.com/s/nfot7939orxhz9o/SFML-2.1-windows-vc12-32bits.zip).
2) Unzip anywhere you want. As a suggestion, you could use C:\SFML-2.1.
3) Create a system environment variable called SFML2_HOME pointing to the folder where you unzipped the file.

TEMPLATE
1) Download the template from here (https://www.dropbox.com/s/gj2ozohgon243oo/SFML2%20Application.zip).
2) Copy the attached ZIP file to Documents\Visual Studio 2013\Templates\ProjectTemplates under your home folder.
3) Open Visual Studio and click FILE, New Project... The "SFML2 Application" Visual C++ template is now available. Create your project.
4) The project is all set up, and the small bundled sample program (the one from the tutorial (http://www.sfml-dev.org/tutorials/2.1/start-vc.php)) is ready to compile.

Details:
The binaries and the template were made with Visual Studio 2013 Express Edition Update 1 running on Windows 8.1 Pro x64. Since VS2013EE only ships with a x86 SDK, I couldn't try and make the template x64-compatible. I also didn't bother building static libraries.
Also, it doesn't matter if you have the SFML2 DLLs in your PATH environment variable nor in the output folder. The template includes a Post-Build Event that copies the DLLs from $SFML2_HOME\bin to the output folder in case they're not there already.
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: Jesper Juhl on February 17, 2014, 05:19:43 pm
OK, I'll probably come across as a grumpy old dude, but I'll take that risk.

While I in no way object to people trying to help out other people by providing easy to use tools/tutorials/guides etc. I really don't see the point of something like this.
What on earth is so difficult in just cloning the SFML git repository? Building the library and adding it to your project? I find SFML to actually be one of the easier libraries to deal with.
Sure, you need to know your way around the compiler, linker, static vs dynamic libraries etc; but seriously, if you don't then please learn that stuff first. If building, installing and using SFML from source is anything but a nobrainer it should be a sign that you need to learn some fundamentals.
Title: AW: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: eXpl0it3r on February 17, 2014, 06:05:31 pm
While I in no way object to people trying to help out other people by providing easy to use tools/tutorials/guides etc. I really don't see the point of something like this.
What on earth is so difficult in just cloning the SFML git repository? Building the library and adding it to your project? I find SFML to actually be one of the easier libraries to deal with.
Sure, you need to know your way around the compiler, linker, static vs dynamic libraries etc; but seriously, if you don't then please learn that stuff first. If building, installing and using SFML from source is anything but a nobrainer it should be a sign that you need to learn some fundamentals.
We hear you. ;)

Then again I've heard there's a bug where CMake generates minorly malformed VS 2013 project files.
Overall it's still way better to simply learn and understand the tools rather that trying the monkey-Shakespear theory. ;)
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: georger on February 17, 2014, 06:15:17 pm
OK, I'll probably come across as a grumpy old dude, but I'll take that risk.
Actually, I think you have a very good point.

While I in no way object to people trying to help out other people by providing easy to use tools/tutorials/guides etc. I really don't see the point of something like this.
My point is: I'm trying to give back.

What on earth is so difficult in just cloning the SFML git repository? Building the library and adding it to your project? I find SFML to actually be one of the easier libraries to deal with.
Depends on the audience. I think this kind of contribution has the following target audience:
1) Beginners who still don't fully command all the necessary tools , e.g. git and CMake;
2) People who just want to dip their toes in the water as quickly and easily and possible (think Linux live CDs);
3) People who just want to automate a little bit of the work, that is, setting up a project on Visual Studio 2013. The project template automates this. Even in the case you don't want/need to build the library yourself, the project template is helpful - many times in the past I wanted to test a little bit of functionality and was put off by the drudgery of setting up a project.

Sure, you need to know your way around the compiler, linker, static vs dynamic libraries etc; but seriously, if you don't then please learn that stuff first. If building, installing and using SFML from source is anything but a nobrainer it should be a sign that you need to learn some fundamentals.
Yup, that's fine from a technical standpoint. But from a, let's say, "marketing" standpoint, making your software as easy as possible to get up and running is a very good thing. Many times in the past I was put off using a library because it was non-trivial to get up and running. For example, a library that only comes in source form and requires me to install and configure Python and Boost.
Finally, remember that SFML itself makes binary downloads available. I'm just offering one more.
Title: Re: AW: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: zsbzsb on February 17, 2014, 07:26:49 pm
Then again I've heard there's a bug where CMake generates minorly malformed VS 2013 project files.

It does produce slightly malformed project files, but then again its really simple to generate VS11 project files and let VS12 do a one way upgrade  :D
Title: Re: AW: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: georger on February 17, 2014, 08:19:58 pm
Then again I've heard there's a bug where CMake generates minorly malformed VS 2013 project files.

It does produce slightly malformed project files, but then again its really simple to generate VS11 project files and let VS12 do a one way upgrade  :D
Now what's the point in *that*?

People have to know their tools, yes. But do VS2013 users also need to know that CMake writes malformed VS2013 project files, and then have CMake generate VS2011 projects just so that they can let VS2013 upgrade those? Why do people not only have to take the longer route, but also know all the relevant bugs, quirks and workarounds? Then just scrap CMake and all other build systems, release only the source files, and let people write their own makefiles.

I've done this a thousand times, and I learned from it. When I have an idea for a project I just want to start coding, that's why I automate things.
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: Jesper Juhl on February 17, 2014, 08:28:34 pm
Somehow I'm not surprised. If you have ever looked at the cmake source code you wouldn't be either.
It's a mess - a horrible, horrible mess.  It mostly works (somehow) but they *really* should not have started down the path of making their own scripting language (badly). They should have focused on making a build system and adopted python, lua, perl or -something-.
If you want something sane, try Scons - just saying.
To find that cmake generates broken build files fails to surprise.
Just my two cents.
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: Nexus on February 17, 2014, 09:29:59 pm
What is this VS 2013 script bug exactly about? Don't hesitate to create a new forum thread so we can try to fix it, instead of discussing which workaround is the best one ;)

And I agree that we should rather focus on making the standard way of installing SFML (via Git clone and CMake) as intuitive and user-friendly as possible, instead of providing several alternatives, all of which have their own problems and are only supported by one developer, who may cease the maintenance at any time.
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: imote on March 03, 2014, 11:57:19 am
Thank you guy.
Successfully tested with Visual Studio Express 2013 Update 1
You helped me so much !
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: imote on March 03, 2014, 05:36:30 pm
Oh !
There is a problem !

In the vanilla configuration, the Network module is not configured. So I configure it and add .lib network dependences.
So it work in Debug and Release mode, but it don't work in Debug Static and Release Static mode, VS2013 says : External librairie [..].
I don't found how to solve the problem. Any ideas ?

I'm french so excuse my syntax and language errors  :-[
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: zsbzsb on March 03, 2014, 06:34:19 pm
Probably the network static libs aren't provided, solve it by building SFML yourself.  ;)
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: imote on March 04, 2014, 09:38:34 am
Ok, thank you ;)
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: Sarbast on June 08, 2014, 09:13:33 pm
Thank you
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: registeredtosaythanks on June 18, 2014, 03:33:26 am
You man. Right there.

You are fucking amazing. 


Thank you.
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: zsbzsb on June 18, 2014, 05:33:27 am
To everyone saying how amazing this.... please just stop and try to learn something instead of going for premade templates that do stuff with MS specific code. There is way more amazing things than a little template that saves maybe 10 minutes of setting up linker options when your actual project will take thousands of times longer.

Learn to compile SFML yourself, its really not hard and takes 15 minutes tops if you stick to the official tutorial. Heck, the install guide for this template is just as long as building SFML. Not to mention learning to compile stuff is part of programming. Oh, and then there is the bugs (some serious ones exist on windows) that exist in 2.1 - not to mention the other great features that have been added since 2.1 in the master branch.

And if you still can't be bother to build SFML yourself........  :P   eXpl0it3r has kindly provided some nightly build (http://nightlybuilds.ch/)s.
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: Fitzy on June 22, 2014, 12:22:18 am
To everyone saying how amazing this.... please just stop and try to learn something instead of going for premade templates that do stuff with MS specific code. There is way more amazing things than a little template that saves maybe 10 minutes of setting up linker options when your actual project will take thousands of times longer.

Learn to compile SFML yourself, its really not hard and takes 15 minutes tops if you stick to the official tutorial. Heck, the install guide for this template is just as long as building SFML. Not to mention learning to compile stuff is part of programming. Oh, and then there is the bugs (some serious ones exist on windows) that exist in 2.1 - not to mention the other great features that have been added since 2.1 in the master branch.

And if you still can't be bother to build SFML yourself........  :P   eXpl0it3r has kindly provided some nightly build (http://nightlybuilds.ch/)s.

There's really no need for this comment at all, I see where you're coming from but some people have their reasons to go for pre-compiled solutions. The reason I added this in the first place was CMake "was" giving strange error's for Visual Studio 2013 builds.

Helping people just get the stress of figuring out how to compile when all they want to do is just get into it and start testing some code, see if it's something they love or hate. Just chill, leave people to it, if it helps just one then big bonus in my eyes.
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: Ixrec on June 22, 2014, 03:46:26 pm
To me this stuff is a symptom of the fact that C++ as a language is very bad when it comes to the build process.  SFML makes it as easy as it could possibly be, but the fact that we have to manually mess with a dozen IDE settings or find/install a dozen dependencies just to make pre-built binaries work is always going to mean people get confused no matter how clear the official tutorials are.  There's just too many things to screw up, and once you do make a mistake it's basically impossible to figure out which one you made unless you've built that exact same project many times in the past, or come here and ask the people that have (my experience is that most practical build-related knowledge does not transfer to other projects).  Until the C++ modules proposal becomes standard, this isn't really going to improve.

If we want to reduce the need for non-experts to write and use these non-official build methods, I think the only thing we could conceivably do is provide not only the binaries, but complete project folders for Visual Studio and maybe other IDEs so that people can just extract the folder somewhere, open the project file in VS and immediately build and run the examples.  Yes it's better if newbies learn to build everything from source right away, but expecting them to do that for a library they've never used before which has more than zero dependencies is just not reasonable (unless they're on Linux).
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: Nexus on June 22, 2014, 04:21:10 pm
Quote from: Fitzy
There's really no need for this comment at all, I see where you're coming from but some people have their reasons to go for pre-compiled solutions. [...] Helping people just get the stress of figuring out how to compile when all they want to do is just get into it and start testing some code, see if it's something they love or hate. Just chill, leave people to it, if it helps just one then big bonus in my eyes.
When we always provide half-solutions that ease the process a little bit, but make it impossible to learn things and apply knowlege to other projects, people will encounter the same problems again and again when using different libraries or even different versions of the same library. Furthermore, provided templates are very limited because they have been created for a specific configuration. It may work for people who just want to create a game as quickly as possible, but avoiding the build and link process of C++ is counter-productive and won't help in the long term. People will thank you for the time they save now, not realizing they just postponed the learning effort and will eventually spend even more time on configuration.

Quote from: Ixrec
To me this stuff is a symptom of the fact that C++ as a language is very bad when it comes to the build process.  SFML makes it as easy as it could possibly be, but the fact that we have to manually mess with a dozen IDE settings or find/install a dozen dependencies just to make pre-built binaries work is always going to mean people get confused no matter how clear the official tutorials are.
What do you mean exactly? Most things you mention are abstracted away by CMake. On Windows even more than on Linux, because third-party dependencies are shipped with SFML. The problem is not that the process is too complicated (even if it arguably is, most of it is done on SFML's side). The problem is rather that a lot of people don't read tutorials carefully. How many threads have been here because people linked the wrong libraries (just mix debug/release or compiler versions), although it is clearly stated in the tutorials? Or how many people do not install SFML but only build it and wonder why the output directory is so ugly?

Quote from: Ixrec
If we want to reduce the need for non-experts to write and use these non-official build methods, I think the only thing we could conceivably do is provide not only the binaries, but complete project folders for Visual Studio and maybe other IDEs [...]
Providing Visual Studio solutions and Makefiles is even worse because you combine the disadvantages of building from source with those of providing binaries. The former are higher complexity and more possibilities to make mistakes (linking third party libraries, wrong paths, ...), while the latter are decreased flexibility (one has to agree on a specific configuration) and availability only for certain revisions. Additionally, there is more effort needed to provide these templates (especially since the CMake-generated solutions are not really appropriate for shipping), to maintain them and to provide support for them if things don't work.

Quote from: Ixrec
Yes it's better if newbies learn to build everything from source right away, but expecting them to do that for a library they've never used before which has more than zero dependencies is just not reasonable (unless they're on Linux).
Of course it is -- hundreds of people succeed in doing so. It is especially reasonable, because everything is well-documented and we have a very active community to help at problems. And of course there are still binary distributions.
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: Fitzy on June 24, 2014, 05:46:02 pm
I did say I understood where the comment was coming from, people should learn the build process but it's not always as simple as that, many people come from Managed Languages like Java and C# and want to learn C++ while learning SFML, some just want to learn the basics of C++ before the build process and providing a "TEMPORARY SOLUTION" to achieve that is always welcomed.

As I said, I made this post because CMake had external dependency errors and wouldn't compile properly so for some people who are still learning the C++ build process to only get errors from Cmake which is suppose to make it easier will only frustrate people. It was just a means to an end at the time and is not suppose to be used long term, it was for easy access.

C++ isn't known for it's easy ways of doing things, think like a noob and not like a pro.
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: Dada on June 25, 2014, 01:35:28 am
For what it's worth (and I'm aware that's close to zero for most of you as this is just opinions from a guy with 2 posts who doesn't even use SFML anymore):

Fitzy and Ixrec are right for the most part and where they are wrong is because they're not going far enough or conceding points in the face of weak arguments.

The ideal SFML user experience can be glimpsed by looking at the Linux installation instructions:
1. sudo apt-get install libsfml-dev
2. done

This is true no matter where the user sits on the noob-to-pro spectrum. While a pro has the *ability* to compile from source and deal with all kinds of issues, they still *prefer* to use a library in packaged form (when it's just a simple dependency on their project). There's many reasons for that, with security and stability sometimes more important than mere convenience (although for a library that isn't hugely popular and arguably targeted at beginners, convenience is the main factor).

This super easy user experience isn't widespread on Windows (yet? I think Nuget has a real shot at bringing this about). In that context, it's perfectly justifiable to say "get the source, install CMake, follow these steps carefully". However that doesn't make the advantages of proper packaging go away, and people who volunteer helpful packaging solutions shouldn't be dismissed as counterproductive.

Not to mention that providing a workaround for an actual issue in the latest official release cannot be a bad thing, surely?
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: Ixrec on June 25, 2014, 09:23:12 am
I'm not even that bothered by the lack of packaging, though that would also help immensely.  What really annoys me is how unhelpful most C++-related tools are when it comes to figuring out build problems, and how unsympathetic the veterans are after they've learned what each error message actually means.

As a very simple example that would prevent a huge number of the newbie questions we get: Why can't compilers somehow mark their compiled binaries as being compiled by so-and-so version of so-and-so compiler with or without debug mode, then complain when they're asked to link against something that doesn't match?

In fact, where I work, the infrastructure people have effectively taught our compilers to do just this by adding some version macros into all their libraries, making it impossible for us to build against the wrong version of anything by accident.  Is there any reason SFML can't do something like this?
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: Laurent on June 25, 2014, 10:22:56 am
The problem is that there are potentially a huge number of compiler or linker settings that can make two binaries incompatible. You can reduce it to a few in a known and controlled environment (like where you work), but I don't know if it would be possible to make something generic.
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: MorleyDev on June 25, 2014, 12:16:42 pm
For my university project I actually looked at C++ dependency management. I concluded pretty early on that any kind of binary hosting-based dependency management system is impractical at best, impossible at worst. So I made a system that uses Git and CMake to acquire, compile and cache dependencies, then updates those compiled dependencies. So long as the compiler in use for MinGW/Unix Makefiles remains consistent, ease of install and binary compatibility are fixed. Though you update/change compilers, you do have to manually delete the cache atm.

So using this system, getting the latest SFML debug binaries is as simple as:
zander_client get sfml2 mingw debug

Which will, internally do a git clone or git pull of sfml to a source cache, then do a cmake build of sfml2, install the artefacts from that build into an artefact cache, and then copy those artefacts to the working directory. If artefacts are already in the cache and up-to-date, it just does the copy to the working directory. If they're in the working directory but out of date, they get replaced by the up-to-date artefacts. If they're in the working directory and up-to-date, nothing happens.

At the moment the tools are pretty simple, a client (https://github.com/MorleyDev/zander.client) written in scala and a simple rest api (https://github.com/MorleyDev/zander.server) written in node.js, but I was planning on posting them here after I add a few more features. Like support for tags and branches, and custom cmake flags (which means different branches, tags and flags will have to result in a different cached artefacts).

Also it requires the source to be open source, hosted in a git repository and buildable and installable via cmake. So baby steps xD
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: Durranos on September 05, 2014, 12:19:42 am
I don't care if I'm necroing this thread. I made an account just so I could post that this was a life saver. I've been screwing around trying to get SFML to cooperate with VS 2013 for a week now. I stumbled onto your solution and omg thank you so very much. It worked like a charm the first time around. Your instructions were clear, precise and very well documented. I tip my hat to you sir, thank you so much!
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: StormWingDelta on December 07, 2014, 10:05:25 pm
As good as this is it needs a few more templates.  One for Console, One for Forms, and one for each of those on the C# version.


Yes this makes people lazier but what's funny is some of my classmates found out that we programmers are here to make things easier for others to do even if it does make them lazier in the end. :)
Title: Re: SFML 2.1 Visual Studio 2013 binaries + source + template
Post by: renodubois on December 17, 2014, 02:05:47 am
Worked like a charm, thanks for this!