The gist of the problem is that I've got a main
function that initializes SDL, sets up OpenGL attributes (for the context creation) gets a context up (a class that represents an OpenGL rendering context (with window and context together)), reports some info on the OpenGL version and other basic info, and enters the usual loop that exits on the user closing the window or pressing ESC.
Except I can't test any of that because main
is never entered, it appears that SDL_main.h
includes a #define
that replaces main
with SDL_main
, and the actual main
is called from a static library. For some reason, that exits with a return value of 0 without ever entering the "actual" main. The weird part is that I changed nothing about the project setup from when it was minimally working (just putting some OpenGL data in a file) to now, besides adding the RenderingContext class. Removing that class from the project does not solve the problem, and I'm only linking the minimal amount of libraries to actually complete linkage.
Is there any solution to the problem, or some issue I didn't know about with SDL2 that might be affected by my project setup?
The code can be found here, most of it under the src directory, with main.cpp in the top level.