SFML community forums

General => SFML website => Topic started by: kullerhamPster on September 06, 2015, 02:16:20 pm

Title: Binaries for VC++ 2015
Post by: kullerhamPster on September 06, 2015, 02:16:20 pm
Hi there. Are there plans to include binaries for VC++ 2015 in the downloads for Windows? As the final version of VS2015 is released and available for download, I think these would be nice to have :)
Title: Re: Binaries for VC++ 2015
Post by: Nexus on September 06, 2015, 02:18:19 pm
It's a work in progress, see the feature/VS2015 (https://github.com/SFML/SFML/tree/feature/VS2015) branch on GitHub. It's a bit more complicated than you might think, because Visual Studio 2015 breaks compatibility to some C libraries.
Title: Re: Binaries for VC++ 2015
Post by: kullerhamPster on September 06, 2015, 02:59:22 pm
It's a work in progress, see the feature/VS2015 (https://github.com/SFML/SFML/tree/feature/VS2015) branch on GitHub. It's a bit more complicated than you might think, because Visual Studio 2015 breaks compatibility to some C libraries.

Thanks for your reply and good to hear that you're already working on this :)
Title: Re: Binaries for VC++ 2015
Post by: Nexus on September 06, 2015, 03:04:02 pm
Just in case it wasn't clear: the linked branch contains binaries that should already work. I'm using Visual Studio 2015 myself (but I haven't tested all configurations yet).
Title: Re: Binaries for VC++ 2015
Post by: kullerhamPster on September 06, 2015, 03:19:27 pm
Just in case it wasn't clear: the linked branch contains binaries that should already work. I'm using Visual Studio 2015 myself (but I haven't tested all configurations yet).

No, I didn't get that - thanks for the clarification. :)

The question might be stupid, but where in this branch do I find the binaries you mentioned? I only found binaries of external libraries needed to build SFML itself.
Title: Re: Binaries for VC++ 2015
Post by: Nexus on September 06, 2015, 03:27:41 pm
Sorry, you're totally right. The branch only contains binaries for SFML's dependencies -- but they're much more difficult to recompile than SFML itself. So, if you have CMake, it shouldn't take long to get working VS 2015 binaries for SFML 2.3.

Otherwise, eXpl0it3r provides nightly builds for VS 2015 RC, I'm not sure if they're still compatible.
http://nightlybuilds.ch/compiler/show/19/Visual%20Studio-2015RC-32/

In addition, some community members have provided binaries for VS 2015, but as they're not official, we cannot guarantee that they work:
http://en.sfml-dev.org/forums/index.php?topic=18243
http://en.sfml-dev.org/forums/index.php?topic=17455

I would recommend using the latest SFML version from GitHub (2.3.x branch, with binaries from the other branch) rather than pre-built binaries. Like this, you can benefit from newest features and bugfixes, and can give us feedback to improve things right away 8)
Title: Re: Binaries for VC++ 2015
Post by: kullerhamPster on September 06, 2015, 03:48:21 pm
Sorry, you're totally right. The branch only contains binaries for SFML's dependencies -- but they're much more difficult to recompile than SFML itself. So, if you have CMake, it shouldn't take long to get working VS 2015 binaries for SFML 2.3.

Otherwise, eXpl0it3r provides nightly builds for VS 2015 RC, I'm not sure if they're still compatible.
http://nightlybuilds.ch/compiler/show/19/Visual%20Studio-2015RC-32/

In addition, some community members have provided binaries for VS 2015, but as they're not official, we cannot guarantee that they work:
http://en.sfml-dev.org/forums/index.php?topic=18243
http://en.sfml-dev.org/forums/index.php?topic=17455

I would recommend using the latest SFML version from GitHub (2.3.x branch, with binaries from the other branch) rather than pre-built binaries. Like this, you can benefit from newest features and bugfixes, and can give us feedback to improve things right away 8)

Thank you. I'm glad I wasn't too stupid to find the binaries :D ;)

I just installed CMake and will see if I'm able to built SFML as you suggested :)

EDIT:
Building the binaries worked. I copied the folders cmake, extlibs, and src from the VS2015 branch to the 2.3.x branch before running CMake and building.
Now I'll have to see if I the binaries are working :)
Title: Re: Binaries for VC++ 2015
Post by: kullerhamPster on September 06, 2015, 04:18:10 pm
Oh yeah, they work :D
This was easier than expected.

Thank you for you help, and thanks for the good documentation and tutorials here on this site :)
Title: Re: Binaries for VC++ 2015
Post by: Khatharr on September 28, 2015, 07:36:01 pm
Hey, I'm trying to compile statics and I'm getting a couple linker errors. I can't seem to resolve them by pulling in the rebuilt deps that people are suggesting, so I'm wondering if I'm missing a dep or something.

I'm using VS2015 on Win7 Ultimate x64 (all of my build stages are x86).

The contents of my lib folder are as follows:
(click to show/hide)

This is the file I use for linking, which gets included once at the entry point:
(click to show/hide)

And this is my build output:
(click to show/hide)

I've tried getting the extlibs from eXpl0it3r's repo, but they appear to match the binaries that are included with the SFML source. (I tried them anyway and got the same errors.) I tried following the link posted by Nexus here, but it's a dead link.

In case it's relevant, my CMake config is as follows:
(click to show/hide)

Any help or advice would be greatly appreciated.
Title: Re: Binaries for VC++ 2015
Post by: eXpl0it3r on September 28, 2015, 07:43:54 pm
Download the latest binaries from the website (http://www.sfml-dev.org/download/sfml/2.3.2/), they've been updated a day ago.

Additionally I suggest you don't use pragma comment for linking. It's not your source codes job to link, but your build system, i.e. your project file.
Title: Re: Binaries for VC++ 2015
Post by: Khatharr on September 28, 2015, 07:49:02 pm
Thank you for the speedy response. Those build but I get pdb errors as follows:
(click to show/hide)

Would rebuilding them with CMake help this?

Edit: Rebuilding from CMake still gives the link errors. Is the source release not updated yet? It would be helpful if the download links were dated.
Title: Re: Binaries for VC++ 2015
Post by: eXpl0it3r on September 28, 2015, 08:51:31 pm
Notice that warnings and errors are a different thing. ;)
Yes, you get warnings always have, because we don't provide the pdb files. It won't help you either if you build from source with CMake, because the pdb files aren't created properly and are not installed either.

And yes, the source code is not yet uptodate, because the VS 2015 builds were created after SFML 2.3.2 had been released by using the feature/vs2015 branch.
Title: Re: Binaries for VC++ 2015
Post by: Khatharr on September 28, 2015, 09:21:05 pm
Not sure if you caught my very subtle request or not, so I'll state it explicitly:

In the future please compile libs without static pdb paths, as it causes problems for end-users.

Title: Re: Binaries for VC++ 2015
Post by: eXpl0it3r on September 28, 2015, 09:26:48 pm
And how does one do that?
Title: Re: Binaries for VC++ 2015
Post by: Khatharr on September 28, 2015, 09:35:15 pm
Setting the Debug Information Format to C7 Compatible will prevent generation and references to pdb files. Alternatively, ensuring that the Program Database File Name is set to a non-static path should fix it, but "things happen".

The pdb files are only relevant if users want to actually step into the SFML code files from the debugger, so the /Z7 option may be the better method since not many users actually have the SFML code laying around in the correct locations for the debugger to open and step into.

Image is attached showing the location of the option in the IDE.

Note that this is only relevant in debug builds. If the /DEBUG flag isn't on then pdb's aren't generated. I think it may disable the /Gm option, which is part of minimal rebuild, but since you're building libs that's not really relevant for the final product.

Edit: After reviewing the C7 option, it turns out that it just embeds the symbol information in the lib itself rather than in a separate file, so you're actually not losing any debug capability by going that route.
Title: Re: Binaries for VC++ 2015
Post by: eXpl0it3r on September 29, 2015, 08:42:30 am
Thanks for the information!

I've created a fix (https://github.com/SFML/SFML/compare/bugfix/vs_debug_z7) for it, does that work for you?
Title: Re: Binaries for VC++ 2015
Post by: Nexus on December 30, 2015, 08:44:54 pm
I created a pull request that should properly install the PDB files and thus resolve the LNK4099 warning.
https://github.com/SFML/SFML/pull/1037
Title: Binaries for VC++ 2015
Post by: eXpl0it3r on December 30, 2015, 11:59:47 pm
Did you test if the PDB are detected properly now?
Title: Re: Binaries for VC++ 2015
Post by: Nexus on December 31, 2015, 12:19:33 pm
Yes, it works for both static and dynamic linking if the .pdb files are located next to the .lib files.

The LNK4099 seems to be triggered only when linking statically, so its disappearing alone is not reliable. But in the VS debugger, you can see under "Modules" whether the symbols for SFML have been loaded. This was the case with those .pdb files (in addition to the linker warning disappearing).

By the way, even if you build the .pdb files in a completely different path, VS can be smart enough to find them -- so you really have to remove the original build files to test it ;)