Ask questionsissues compiling with VS2019
Windows 10 1903
I 99% sure this is me doing something wrong. I want to understand better how the program works in order to be more helpful and create some functions, one of the first steps i'm trying is to learn how to compile the source (never did anything similar before), so i followed the guide but did not suceeded, i never used visual studio before (my programming skills are arduino, lol).
The error i'm having when trying to compile is posted here pastebin .
i also read something about compiling libraries, i have no idea which ones are, and where to download them. there is nothing on the guide.
Answer questions douggorgen
I am now able to compile and run PrusaSlicer using Visual Studio 2019. Hope this helps.
I am a total noob, so go easy on me. This procedure is probably not optimal.
I installed all of Visual Studio because I was getting errors for missing includes. The errors went away after installing everything. If anyone knows the exact minimum set of options, please post here. For me, it's not worth my time to figure out the minimum set of options just to save a few GB.
After this worked the first time, I uninstalled everything and did it over to make sure it still worked.
I have not tried all the combinations of builds i.e. debug, release, 32 bit, 64bit, cross compile, etc. So far it works for me in Windows 64 bit debug mode.
I did this on my gaming machine which had never before been used for code development so there should not have been anything present that helped me without my knowing about it.
These build steps are of course based on the "Building PrusaSlicer on Microsoft Windows" guide. I repeat those steps to show the actual parameters that I used.
Now for the procedure I followed:
Install Visual Studio Community 2019 from visualstudio.microsoft.com/vs/ Select all workload options // I don't know which ones are required, so I selected them all
Install git for Windows from gitforwindows.org download and run the exe accepting all defaults
download PrusaSlicer-master.zip from github I downloaded this to d:\downloads\PrusaSlicer and unzipped to d:\downloads\PrusaSlicer\PrusaSlicer-master\ so this will be my prefix for all my steps. Substitute your prefix.
go to the Windows Start Menu and Click on "Visual Studio 2019"->"x64 Native Tools Command Prompt" to open a command window
cmake .. -G "Visual Studio 16 2019" -DDESTDIR="d:\downloads\PrusaSlicer\PrusaSlicer-master"
msbuild /m ALL_BUILD.vcxproj // This took 13.5 minutes on my machine: core I7-7700K @ 4.2Ghz with 32GB main memory
cmake .. -G "Visual Studio 16 2019" -DCMAKE_PREFIX_PATH="d:\downloads\PrusaSlicer\PrusaSlicer-master\usr\local"
open Visual Studio for c++ development (VS asks this the first time you start it)
Open->Project/Solution or File->Open->Project/Solution (depending on which dialog comes up first)
click on d:\downloads\PrusaSlicer\PrusaSlicer-master\build\PrusaSlicer.sln
Debug->Start Debugging or Debug->Start Without debugging PrusaSlicer should start. You're up and running!