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

Author Topic: Can't build SFML 2.1 project on Windows  (Read 1095 times)

0 Members and 1 Guest are viewing this topic.

pedroos

  • Newbie
  • *
  • Posts: 2
    • View Profile
Can't build SFML 2.1 project on Windows
« on: January 05, 2021, 07:06:18 pm »
I'm trying to build the following SFML 2.1 project: https://github.com/Muzkaw/Particles-OpenGL.

I have downloaded SFML 2.1 for Windows (I'm on Windows 7) and updated the project's include and lib directories properly. I have VS Express 2012, VS Express 2017 and Visual Studio 2019 installed.

I open the project on VS Express for Desktop 2012 and build, and I get:

Error   1       error MSB8020: The builds tools for v141 (Platform Toolset = 'v141') cannot be found. To build using the v141 build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install v141 to build using the v141 build tools.
 

I change Platform Toolset from v141 to Visual Studio 2012 (v110), and I can build the solution. Then, at runtime I get the exception:

at C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\crt\src\intel\chkstk.asm
Unhandled exception at 0x00DB7967 in Particles.exe: 0xC00000FD: Stack overflow (parameters: 0x00000000, 0x001B2000).

So I turn to v141 toolset. https://stackoverflow.com/questions/44046355/visual-studio-2015-not-detecting-v141-2017-build-tools says:

Quote
Platform Toolset V141 is from Visual Studio 15 2017 not Visual Studio 14 2015. Basically, the software is backward compatible but not upward compatible.

When I try to compile the project in VS Express 2017, with Tool v110 I can compile, but get the same runtime Exception (stack overflow).
With v141, I can't compile:

Error   LNK2038 mismatch detected for '_MSC_VER': value '1700' doesn't match value '1900' in main.obj   Particles       C:\c\Dev\cpp\Particles-OpenGL\Particles\sfml-system-s-d.lib(String.cpp.obj)     1      

In https://stackoverflow.com/questions/54175280/errorlnk2038mismatch-detected-for-msc-ver-value-1700-doesnt-match-value, I read:

Quote
By design, Visual Studio 2017's C/C++ Runtime has been made binary compatible with Visual Studio 2015 Update 3 C/C++ Runtime to simplify adoption. This is not the normal pattern, and VS 2012 is not binary compatible with VS 2015/2017.

Is there a way of compiling this project without re-compiling SFML? If not, which VS version should I compile SFML 2.1 against (2012, 2015, 2017)?
« Last Edit: January 05, 2021, 07:07:53 pm by pedroos »

pedroos

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Can't build SFML 2.1 project on Windows
« Reply #1 on: January 06, 2021, 01:09:38 am »
Nevermind, I could build SFML 2.1 by installing an older version of CMake instead of the latest version. From there, I could run the simulation in VS Express 2012.  :P

 

anything