How to Compile libspex in Windows - SpaceXpanse/Documentation GitHub Wiki
How to Compile libspex
In this tutorial, we'll compile libspex for C++ so that we can use it in other tutorials and even in our own games.
MSYS2
Download MSYS2 x86_64 (https://www.msys2.org/) from this link:
https://github.com/msys2/msys2-installer/releases/download/2022-01-28/msys2-x86_64-20220128.exe
Install into default path C:/msys64 then run MSYS2 MingGW 64-bit (NOT the 32-bit version) from your Start menu.
Update with pacman as follows.
pacman -Syuu
Type 'Y' to close the terminal and restart MSYS2 MingGW 64-bit again.
Build & Install libspex
Next, run this command to get and run the script that will build libspex for you.
curl -o ./build.sh https://raw.githubusercontent.com/SpaceXpanse/Documentation/main/Code/libspex/Compile-scripts/build.sh; ./build.sh
You may need to press Enter and enter Y 1 or more times for the build to begin.
Done!
CONGRATULATIONS!
Congratulations! You've just built your own GSP using libspex. You can now proceed on to the Hello World in C++ tutorial where we'll put libspex to good use!
Building Lite Mode support files
Run this command to get and run the script that will build lite mode libraries for you.
curl -o ./buildLiteMode.sh https://raw.githubusercontent.com/SpaceXpanse/Documentation/main/Code/libspex/Compile-scripts/buildLiteMode.sh; ./buildLiteMode.sh
Update libspex
We update libspex periodically. If you wish to update your build, enter the following into the same MSYS2 MingGW 64-bit terminal that you used above.
cd ~/libspex
git pull
make clean
./autogen.sh
./configure
make -j2
make install
You're now up-to-date with the latest version!