The project can be built from source using any modern C++ compiler. A precompiled executable is also available through GitHub Releases and GitHub Actions artifacts for users who do not wish to compile the source code manually.
Before building the project, make sure you have:
-
A C++ compiler with C++17 support:
- GCC / MinGW-w64
- Microsoft Visual C++ (MSVC)
- Clang
-
Git (optional, for cloning the repository)
-
Windows, Linux, or macOS operating system
git clone https://github.com/Perry1231/Adventure-Game.git
cd Adventure-GameCompile all source files into a single executable:
g++ -static-libgcc -static-libstdc++ -static *.cpp -o AdventureGame.exeThe static build includes all required runtime libraries directly inside the executable. This allows the game to run on other Windows computers without requiring MinGW, MSYS2, or additional DLL files.
After compilation, run:
AdventureGame.exe- Install the C/C++ Extension by Microsoft.
- Open the project folder.
- Open the integrated terminal.
- Build the project using:
g++ -static-libgcc -static-libstdc++ -static *.cpp -o AdventureGame.exe- Run the generated executable:
./AdventureGame.exe- Open Visual Studio.
- Select Open a Local Folder.
- Choose the Adventure-Game project folder.
- Build the solution using:
Build → Build Solution
- Start the game:
Local Windows Debugger
This repository includes GitHub Actions workflows that automatically compile the project whenever changes are pushed to the repository.
To download the latest automatically generated build:
- Open the repository on GitHub.
- Navigate to:
Actions → Latest Successful Workflow
- Download the generated artifact:
AdventureGame.zip
- Extract the archive.
- Run:
AdventureGame.exe
No compiler or development tools are required when using a prebuilt release.
The executable generated using static linking can be copied directly to another Windows computer.
Steps:
- Build the project.
- Copy:
AdventureGame.exe
- Transfer the file to another PC.
- Double-click the executable to start the game.
No source code, compiler, or external libraries are required.
The GCC compiler is not installed or not added to the system PATH.
Install one of the following:
- MinGW-w64
- MSYS2
- Visual Studio Build Tools
Verify installation:
g++ --versionBecause the executable is not digitally signed, Windows SmartScreen may display a warning.
To continue:
More Info → Run Anyway
This behavior is common for independent and educational projects.
If compilation fails:
- Verify that all
.cppfiles are present. - Confirm that your compiler supports C++17.
- Ensure all project files are located in the same directory.
- Check that no source files have been renamed or removed.
Successful compilation creates:
AdventureGame.exe
This executable contains the complete game and can be distributed to other Windows users without additional dependencies.