SFML community forums

Help => General => Topic started by: npnrj308 on January 04, 2021, 10:23:31 pm

Title: Visual Studio 2019 16.8.3
Post by: npnrj308 on January 04, 2021, 10:23:31 pm
I'm running Visual Studio Community 2019, reporting itself as version 16.8.3. I was surprised to see there were no pre-built downloads for SFML for anything after VS 17. Have I missed something or do I have to start by running what looks like a fairly painful SFML build process before I can experiment with it?
Title: Re: Visual Studio 2019 16.8.3
Post by: Kvaz1r on January 04, 2021, 11:01:10 pm
Build SFML from source is really easy so do it without doubt. If you will have any question about that - just ask.
Title: Re: Visual Studio 2019 16.8.3
Post by: npnrj308 on January 05, 2021, 10:14:49 pm
Sadly not so easy, the instructions don't seem to be valid for VS 2019, e.g. the file vcvars32 doesn't seem to exist in this Visual studio implementation.
Title: Re: Visual Studio 2019 16.8.3
Post by: Kvaz1r on January 06, 2021, 12:12:04 am
Why you even need this file? What instruction do you followed? This one - https://www.sfml-dev.org/tutorials/2.5/compile-with-cmake.php or other?
Title: Re: Visual Studio 2019 16.8.3
Post by: kojack on January 06, 2021, 12:50:34 am
Sadly not so easy, the instructions don't seem to be valid for VS 2019, e.g. the file vcvars32 doesn't seem to exist in this Visual studio implementation.
My VS2019 has vcvars32.bat. It's in C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build
But if you ever want a command prompt set up for visual C++ (same as vcvars32.bat does) then you can open the windows start menu and type x86. You should see an entry for "x86 Native Tools Command Prompt for VS 2019". There's also an x64 version (and some others for cross compiling).
Title: Re: Visual Studio 2019 16.8.3
Post by: jacmoe on January 10, 2021, 04:56:05 pm
You can also use vcpkg and install SFML from source without any pain.
Since it is a Microsoft thing it integrates really well with Visual Studio.
Just run the following in a command prompt from your project directory:
git clone https://github.com/microsoft/vcpkg
Code: [Select]
cd .\vcpkg\
.\bootstrap-vcpkg.bat
.\vcpkg.exe install sfml
Or .\vcpkg.exe install sfml --triplet x64-windows-static if you want a static build.

By the way: hi Kojack, long time, no see :)