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

Author Topic: Several strange errors while compiling with MSVC 2015  (Read 7381 times)

0 Members and 1 Guest are viewing this topic.

GraphicsWhale

  • Full Member
  • ***
  • Posts: 131
    • View Profile
Several strange errors while compiling with MSVC 2015
« 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:

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Several strange errors while compiling with MSVC 2015
« Reply #1 on: June 13, 2015, 05:55:15 am »
Its because VC14 broke the C runtime, so the C extlibs need to be recompiled.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

GraphicsWhale

  • Full Member
  • ***
  • Posts: 131
    • View Profile
Re: Several strange errors while compiling with MSVC 2015
« Reply #2 on: June 13, 2015, 06:12:07 am »
How can I recompile them?

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Several strange errors while compiling with MSVC 2015
« Reply #3 on: June 13, 2015, 06:33:43 am »
Go find their source and figure out how to compile them.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

Kanefa

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
Re: Several strange errors while compiling with MSVC 2015
« Reply #4 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.
« Last Edit: July 23, 2015, 01:08:24 am by Kanefa »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
AW: Several strange errors while compiling with MSVC 2015
« Reply #5 on: July 23, 2015, 03:33:33 pm »
Google for "universal crt".

For VS 2015RC there are also my "nightly" builds.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Kanefa

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
Re: Several strange errors while compiling with MSVC 2015
« Reply #6 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).

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
AW: Re: Several strange errors while compiling with MSVC 2015
« Reply #7 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. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Awsom3d

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Several strange errors while compiling with MSVC 2015
« Reply #8 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 :/


Awsom3d

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Several strange errors while compiling with MSVC 2015
« Reply #10 on: August 29, 2015, 06:03:07 pm »
Thank you Gambit ;)