SFML community forums

Help => General => Topic started by: GraphicsWhale on June 13, 2015, 05:40:57 am

Title: Several strange errors while compiling with MSVC 2015
Post by: GraphicsWhale on June 13, 2015, 05:40:57 am
I'm trying to compile SFML 2.3 with Visual Studio Community Edition (2015) and I'm getting weird compiling errors. This is limited to this particular version of MSVC as 2013 does not exhibit any compiler errors while trying to compile using the exact same process.

To compile, I went to command prompt, called vcvars32.bat, opened c-make gui, then setup selected the appropriate folders, then generated the project files. It compiles successfully for a few seconds before it starts spitting out errors.

And the errors listed include (but not limited to):
unresolved external symbol __iob_func_referenced in function_output_message
unresolved external symbol __iob_func
unresolved external symbol __vsnprintf_s
unresolved external symbol _vsnprintf_s referenced in function _local_vsnprintf

Here's a screenshot:
(http://i.imgur.com/NPUpKC3.png)
Title: Re: Several strange errors while compiling with MSVC 2015
Post by: zsbzsb on June 13, 2015, 05:55:15 am
Its because VC14 broke the C runtime, so the C extlibs need to be recompiled.
Title: Re: Several strange errors while compiling with MSVC 2015
Post by: GraphicsWhale on June 13, 2015, 06:12:07 am
How can I recompile them?
Title: Re: Several strange errors while compiling with MSVC 2015
Post by: zsbzsb on June 13, 2015, 06:33:43 am
Go find their source and figure out how to compile them.
Title: Re: Several strange errors while compiling with MSVC 2015
Post by: Kanefa on July 23, 2015, 01:06:41 am
Its because VC14 broke the C runtime, so the C extlibs need to be recompiled.

Is anyone able to explain this with a small example? I am a bit confused as to what exactly it means.
Title: AW: Several strange errors while compiling with MSVC 2015
Post by: eXpl0it3r on July 23, 2015, 03:33:33 pm
Google for "universal crt".

For VS 2015RC there are also my "nightly" builds.
Title: Re: Several strange errors while compiling with MSVC 2015
Post by: Kanefa on July 23, 2015, 06:08:05 pm
I googled "universal crt" and read the msdn article (thanks for this). I now see Microsoft redesigned the cruntime for Visual Studio 2015. This can be necessary because the cruntime is both compiler and platform specific.

Now to try and answer my own question. I downloaded the SFML source and I see there is a directory named extlibs with a subdirectory name libs-msvc. Now there are libs for both 32 and 64 bit Windows. These libraries were compiled with an older version of the cruntime library, so their in-place generation of some functions will be outdated. Hence the errors. You'd need to track down the flac, freetype, jpeg, ogg, openal32, vorbis, vorbisenc, and vorbisfile source and recompile it with VS2015. Then you can build SFML with VS2015.

I am fine using VS2013 for now. I just wanted to understand what was happening. That being VS2015 has been released (it's no longer a release candidate).
Title: AW: Re: Several strange errors while compiling with MSVC 2015
Post by: eXpl0it3r on July 23, 2015, 11:59:38 pm
I am fine using VS2013 for now. I just wanted to understand what was happening. That being VS2015 has been released (it's no longer a release candidate).
Good to know. I'm.currently on vacation (hello Lisbon) and will look into preparing a new release when I get back. ;)
Title: Re: Several strange errors while compiling with MSVC 2015
Post by: Awsom3d on August 29, 2015, 10:44:33 am
Still no news on the subject? I tried to build it myself with VS2015 but I failed :/
Title: Re: Several strange errors while compiling with MSVC 2015
Post by: Gambit on August 29, 2015, 12:35:53 pm
https://github.com/SFML/SFML/tree/feature/VS2015

http://en.sfml-dev.org/forums/index.php?topic=18642.msg135029#msg135029
Title: Re: Several strange errors while compiling with MSVC 2015
Post by: Awsom3d on August 29, 2015, 06:03:07 pm
Thank you Gambit ;)