I'm using the SDL functions without the SDL_main be defined. Is that fine?

后端 未结 2 945
日久生厌
日久生厌 2020-12-15 13:48

that\'s my code:

Lib.h

#ifdef ExportLib
    #define Lib __declspec(dllexport)
#else
    #define Lib __declspec(dllimport)
#endif
extern void Lib Laun         


        
2条回答
  •  生来不讨喜
    2020-12-15 14:25

    I'm using the SDL functions without the SDL_main be defined. Is that fine?

    Possibly, possibly not. Use SDL_SetMainReady() instead to be sure:

    SDL_SetMainReady: Use this function to circumvent failure of SDL_Init() when not using SDL_main() as an entry point.

提交回复
热议问题