- Visual Studio 2019
- C/C++ workload for VS (includes SDK and CMake)
- Allegro 5.2.6 source code from GitHub
- Unzip allegro somewhere
- Start a "x64 Native Command Tools" prompt
- Navigate to allegro root dir
- Configure for debugging
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Debug
cmake --build build
(or skip this and just open ALLEGRO.sln in VS)
I would exploit the CMake machinery and just temporarily add another program to the examples. Then at least it will automatically keep all the dependencies in sync. Add example(peter_work)
to examples\CMakeLists.txt, just above example(ex_config DATA sample.cfg)
, line 94.
Then create peter_work.c in examples. (or copy across one of the other simple examples)
When you rebuild the soluction it will auto-reconfigure and give you another Project in VS.
First, make that the project the default Startup project. Right click and edit the properties, Debugging section so that
- it will start in the examples directory - change Working Directory to
$(ProjectDir)\..\examples
- it will have the 'development' Allegro libraries on the PATH - change Environment to
PATH=$(ProjectDir)..\lib\$(Configuration);$(Path)
Now you should be able to start & debug the program and any part of Allegro.