I'm looking at possibly using SDL2 from my own private languages. They can talk to dynamic libraries such as SDL2.dll so it might be feasible. But first I need to try it out using C.
But, a hello-world style of tutorial was elusive (they're for the wrong version of SDL, or they're in C++ or whatever). Finally however I put together a minimum program (just #include "sdl.h" and main(){} will show the problem), and I can't link because I don't have main() or WinMain().
I understand that SDL.h or some other header redefines my 'main', as it wants to use its own main() routine. That presumably lives in some statically linked library of SDL, as it can't be inside SDL2.dll. I don't have that library and can't see any point in getting it as I won't be able to use it in my own language (also it will be implementation specific or even come as source code, in which case forget it!).
I managed to get a basic test program working by adding '#undef main'.
My question is, however, is there anything essential in SDL's main() that I will need, or that is likely to bite me in the future? Or can I get away without it? (And why doesn't SDL just depend on some SDL_init() routine for me to call from my main()?)
(I registered with SDL forums to ask about this, but apparently they don't allow me to post, as I don't have the right privileges. So what was the point of registering?!)