Please forgive me if this is a relatively trivial question but I am new to Vala and don’t have any background in c/c++ either. Am I correct in thinking there must be a VAPI for any C library I want to use and they must have the same name?
After looking through the Vala API I saw a sdl2 API and thought I would try put together a simple example. Looks like the only VAPI is for sdl not sdl2. Does the VAPI’s not all ship with Valac?
I also see examples of Vala applications for OpenGL and GLFW yet I see no VAPI for these. I don’t know if this makes any difference but I am using meson. I either get an error suggesting no run-time dependency can be found using pkgconfig or cmake. Then if I use the actual lib name I get an error regarding no VAPI.
The SDL2 vapi files were added quite recently to the main vala repository (committed one month ago), so depending where you’re installing vala from, you might not have a recent enough version. It was previously in the vapi-extras, so you’ll probably need to install this distro package to have it.