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

Author Topic: Precompiled Libraries for Visual Studio 2017 (STATIC)  (Read 2599 times)

0 Members and 1 Guest are viewing this topic.

JayhawkZombie

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Precompiled Libraries for Visual Studio 2017 (STATIC)
« on: July 11, 2017, 05:47:18 am »
I went ahead and pre-compiled SFML for Visual Studio 2017 for both Debug and Release, and both for targeting x86 and x64.
It is all using STATIC libraries, so the "Runtime Library" is set to "MTd" for Debug, and "MT" for release. "Basic Runtime Checks" are set to "Default", and "Preprocessor" contains "SFML_STATIC" as is needed for static linking.

The target platform is set to "10.0.15063.0" by default, but it will also compile if set to "8.1" if you aren't using Windows 10.  First thing you should change if you get errors is to check "Properties > Configuration Properties > General > Target Platform" and change it to 8.1 if you're not on Windows 10.

I've linked a zip with a VS solution pre-made to unzip and go.  The include paths are relative to the solution direction ("$(SolutionDir)/Dependencies/include") so there's no need to put the files in any "special" directory, and the linker is set up to find the lib files based on the configuration and target platform (also relative to the solution directory).

"SFMLTemplate/Dependencies" has "include" and "libs". "include" is obvious.  "libs" is split into "x86" and "x64" and each has "Debug" and "Release" with the appropriate libs.

The executables will be generated in the following location:
<Solution>/<TargetPlatform>/<Configuration>

So you'll end up with the exe in one of:
"SFMLTemplate/x86/Debug", "SFMLTemplate/x86/Release", "SFMLTemplate/x64/Debug", "SFMLTemplate/x64/Release"

depending on how how you are set up to compile.  "openal32.dll" is dropped in the top folder, so just copy it to wherever the executable is if you use the audio library.

The template contains a short program, basically the same as the tutorial app, and I've compiled it and run it on all 4 configurations and verified it works for both targeting the Windows 10 SDK and Windows 8.1 SDK.
Provided all is sound, you should just be able to unzip it, open it up in VS, compile it, and go.

Size is ~40MB compressed, 190MB uncompressed.
I hosted it on my dropbox, since I don't know if GitHub will appreciate uploading such a large directory.

https://www.dropbox.com/s/qe3e32rt3qymubv/SFMLTemplate.zip?dl=0