OpenGL, SDL, Windows, and Linux

Started by
2 comments, last by thedigga007 20 years, 5 months ago
fixed. [edited by - thedigga007 on November 15, 2003 4:34:58 AM]
Advertisement
RTFM. This is covered in detail.
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.

fixed...thanks for the help.

[edited by - thedigga007 on November 15, 2003 4:34:35 AM]

This topic is closed to new replies.

Advertisement