Setting Up with Visual Studio - sinusinu/Flora GitHub Wiki
This document assumes that you are using Visual Studio Community 2022.
If you have a different version, some things might be a little bit different but overall process should be the same.
-
Open Visual Studio.
-
Create new
Console Appproject. Fill out the details. -
Set Target Framework to
.NET 6.0or newer.
⚠️ Flora strictly supports x64 platform only. If any other platform (including Any CPU) is used, it may cause random crashes and memory corruption.
-
On Solution Explorer, Right click your solution, Click
Properties. -
On left pane, Click
Configuration Properties. -
Click
Configuration Manager...on top. -
On
Active solution platform:, Click<New...>. -
Select
x64as the new platform, SetCopy settings from:to<Empty>, and PressOK. -
On
Active solution platform:, Click<Edit...>. -
Select
Any CPUand ClickRemove. -
Close out of the property window.
-
On Solution Explorer, Right click your solution, Click
Add→Existing Project.... -
Select
Flora.csprojfile from cloned Flora repository. -
On Solution Explorer, Right click on
Dependenciesunder your project, ClickAdd Project Reference.... -
Check
Flora. -
Click
OK.
Flora requires external libraries to work properly. These files need to be copied into build folder whenever the project is built.
By using simple post-build event, we can automate copying process.
-
On Solution Explorer, Right click your project, Click
Add→New Folder. -
Name the new folder
extlibs. -
On Solution Explorer, Right click your project, Click
Properties. -
Navigate to
Build→Events. -
Copy-paste this line into
Post-build event:
xcopy "$(ProjectDir)extlibs\\*.*" "$(TargetDir)" /Y-
Save.
-
Place these files into
extlibsfolder.
SDL2.dll (2.0.22)
SDL2_ttf.dll (2.0.18)
soloud_x64.dll (20200207)
Now you may continue to Simple Program.