Jump to content
  • Advertisement
Sign in to follow this  
Yamian

SDL problems, dif from ones under this

This topic is 5049 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to learn SDL in Dev-C++ 5 and I compiled the following code in a console application with the project linked to "-lmingw32 -lSDLmain -lSDL" and compiled just right, no errors, except for one thing... the .exe is protected and I can't compile again. What can I do? #include <iostream> #include <SDL/SDL.h> using namespace std; int main(int argc, char *argv[]) { if( SDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO) <0 ) { cout << "Unable to init SDL: %s\n" << SDL_GetError(); return 1; } system("PAUSE"); return 0; }

Share this post


Link to post
Share on other sites
Advertisement
I find this means the last exe is still running.
use Task Manager to kill the last one.

you need to use SDL_Quit() at the end of your code.

Share this post


Link to post
Share on other sites
I got another problem. How do I get rid of the console window? I tried selecting "Do not create console window" but it still does.

Share this post


Link to post
Share on other sites
1) make sure your project target is "Win32 GUI" (project options, General)
2) make sure that the no-console option is actually being used (check the compile log tab)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!