SDL and windows
I cannot seem to get SDL_Init to work under windows ( using dev-cpp) I have WINMAIN instead of main( int argc, char *argv[]). I finally got SDL installed and everything, but now getting a big headache. Please help. Thanks.
thats your problem, you need to have main( int argc, char *argv[]) and link against libSDLmain.a
So how do all you guys do it ? Nobody using windows to do window, mouse ...
handling? I'm new to all this ( did c-programming, now into c++ and Opengl).
I see there are a lot of people combining OpenGL and SDL, but whats the best way to get into game programming? No windows GUI type projects?
handling? I'm new to all this ( did c-programming, now into c++ and Opengl).
I see there are a lot of people combining OpenGL and SDL, but whats the best way to get into game programming? No windows GUI type projects?
Quote:I thought it was perfectly valid to use your own WinMain and discard SDLmain.lib, thereby suppressing the annoying console window.
thats your problem, you need to have main( int argc, char *argv[]) and link against libSDLmain.a
I haven't tried it yet - I just took some peoples' words for it.
- ben
- Ben
Quote:
Original post by carb
I thought it was perfectly valid to use your own WinMain and discard SDLmain.lib, thereby suppressing the annoying console window.
I don't know about how it works with Dev-C++ but I know with VC6 the console has nothing todo with useing main/winmain. In VC when you create a new project if you pick "console app" you'll get a console window where as if you pick "win32 app" you won't. Its todo with which windows libs get linked into your app. In both cases you use standard main(int argc, char **argv) for your app entry point though. SDL has a macro that looks for main and renames it, befor calling it from its own version of winmain(). I'm pretty sure SDL has some of its own code to get it up and running in its winmain() so if you over-ride it then the code won't be called and SDL won't work (which seems resonable if you can't get SDL to work after not useing its winmain()).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement