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.

Creating a Project

  1. Open Visual Studio.

  2. Create new Console App project. Fill out the details.

  3. Set Target Framework to .NET 6.0 or newer.

Setting Target Platform to x64

⚠️ Flora strictly supports x64 platform only. If any other platform (including Any CPU) is used, it may cause random crashes and memory corruption.
  1. On Solution Explorer, Right click your solution, Click Properties.

  2. On left pane, Click Configuration Properties.

  3. Click Configuration Manager... on top.

  4. On Active solution platform:, Click <New...>.

  5. Select x64 as the new platform, Set Copy settings from: to <Empty>, and Press OK.

  6. On Active solution platform:, Click <Edit...>.

  7. Select Any CPU and Click Remove.

  8. Close out of the property window.

Adding Flora project reference

  1. On Solution Explorer, Right click your solution, Click AddExisting Project....

  2. Select Flora.csproj file from cloned Flora repository.

  3. On Solution Explorer, Right click on Dependencies under your project, Click Add Project Reference....

  4. Check Flora.

  5. Click OK.

Copying external libraries

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.

  1. On Solution Explorer, Right click your project, Click AddNew Folder.

  2. Name the new folder extlibs.

  3. On Solution Explorer, Right click your project, Click Properties.

  4. Navigate to BuildEvents.

  5. Copy-paste this line into Post-build event:

xcopy "$(ProjectDir)extlibs\\*.*" "$(TargetDir)" /Y
  1. Save.

  2. Place these files into extlibs folder.

⚠️ Get 64-bit version of these.
SDL2.dll (2.0.22)
SDL2_ttf.dll (2.0.18)
soloud_x64.dll (20200207)

All done!

Now you may continue to Simple Program.

⚠️ **GitHub.com Fallback** ⚠️