Introduction
I’ve started 2024 looking for new technologies to explore and there was one I had in mind to explore a bit, the LGVL library, a open-source graphics library for embedded systems.
When I started looking into the documentation about the simulator in VSCode, I noticed there was no clear documentation on how to run the simulator on macOS. After following the first steps and triying to build the code, I end up having no success on the last. The code didn’t build.
In order to find what was missing on my side, I decided to run a simple SDL minimal project and noticed the following line was NOT present in the previous repository Makefile:
This line will expose the C Flags and the library path, which are necesary for a successful build of the project.
Steps
a. Install SDL2:
b. Find SDL2 paths:
It will print something like this:
c. Add the include SDL2 path to the Makefile:
d. Include the SDL2 library and respective C flags, by adding sdl2-config --cflags --libs
:
e. Change the main.c
include #include <SDL2/SDL.h>
to #include <SDL.h>
.
f. Run make
🤝
Other
I’ve created a PR to merge this info to the main branch.
There is also another PR which adds support for CMake on MacOS.