OpenGL, SDL, Windows, and Linux
quote:Original post by thedigga007
The problem lies where windows wants it to be a winMain and SDL is using - int main(void){}. My question is...how can I get it to compile on both systems w/out changing the source for each compilation? Is there anyway that I can say "#if defined(_WIN32) then do a WinMain" otherwise do a int main(void)?
See I get "Undefined reference to ''SDL_main''" (it explains this issue, even though the question is something else). SDL''s "WinMain" function is in the SDLmain library provided (you link to it statically).
quote:Original post by thedigga007 How do people get around using extensions for both platforms?
You don''t get around using extensions, you just use them in a platform independent way. See SDL_GL_GetProcAddress.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement