13 Replies - 670 Views - Last Post: 29 October 2013 - 08:05 AM Rate Topic: -----

#1 kugi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 16-August 13

SDL in MinGW studio: Can't execute

Posted 23 October 2013 - 05:29 AM

I succeeded setting up SDL 1.2.15, (with lazy foo'productions) and I making secong step lazy foo-second step. I read everythink and do every step. But in the last, my MinGW developer studio can't execute. (There is no errors or warnings).
This is my code:
/*source from lazy foo - it cant execute*/

//Include SDL functions and datatypes
#include "SDL/SDL.h"

int main( int argc, char* args[] )
{
    //The images
    SDL_Surface* hello = NULL;
    SDL_Surface* screen = NULL;

    //Start SDL
    SDL_Init( SDL_INIT_EVERYTHING );

    //Set up screen
    screen = SDL_SetVideoMode( 640, 480, 32, SDL_SWSURFACE );

    //Load image
    hello = SDL_LoadBMP( "hello.bmp" );

    //Apply image to screen
    SDL_BlitSurface( hello, NULL, screen, NULL );

    //Update Screen
    SDL_Flip( screen );

    //Pause
    SDL_Delay( 2000 );

    //Free the loaded image
    SDL_FreeSurface( hello );

    //Quit SDL
    SDL_Quit();

    return 0;
}




Why can't execute?

Is This A Good Question/Topic? 0
  • +

Replies To: SDL in MinGW studio: Can't execute

#2 Peter O  Icon User is offline

  • D.I.C Head

Reputation: 76
  • View blog
  • Posts: 181
  • Joined: 19-October 13

Re: SDL in MinGW studio: Can't execute

Posted 23 October 2013 - 05:36 AM

Is the code compiled and an executable file created?
Was This Post Helpful? 1
  • +
  • -

#3 kugi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 16-August 13

Re: SDL in MinGW studio: Can't execute

Posted 23 October 2013 - 11:12 AM

Code compiled (0 errors 0 warnings), but don't execute.
I enclose .o file
Was This Post Helpful? 0
  • +
  • -

#4 Peter O  Icon User is offline

  • D.I.C Head

Reputation: 76
  • View blog
  • Posts: 181
  • Joined: 19-October 13

Re: SDL in MinGW studio: Can't execute

Posted 23 October 2013 - 12:43 PM

I have never used MinGW Developer Studio but if there is something called "build" maybe you should try that instead of "compile".
Was This Post Helpful? 1
  • +
  • -

#5 kugi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 16-August 13

Re: SDL in MinGW studio: Can't execute

Posted 25 October 2013 - 06:09 AM

I tried this, but it doesn't execute.
Next idea?
Was This Post Helpful? 0
  • +
  • -

#6 Peter O  Icon User is offline

  • D.I.C Head

Reputation: 76
  • View blog
  • Posts: 181
  • Joined: 19-October 13

Re: SDL in MinGW studio: Can't execute

Posted 25 October 2013 - 06:30 AM

Have you tried pressing F8?
Was This Post Helpful? 1
  • +
  • -

#7 kugi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 16-August 13

Re: SDL in MinGW studio: Can't execute

Posted 25 October 2013 - 09:41 AM

yes, but:
CANNOT EXECUTE PROGRAM!

yes, but:
CANNOT EXECUTE PROGRAM!
Was This Post Helpful? 0
  • +
  • -

#8 Peter O  Icon User is offline

  • D.I.C Head

Reputation: 76
  • View blog
  • Posts: 181
  • Joined: 19-October 13

Re: SDL in MinGW studio: Can't execute

Posted 25 October 2013 - 09:50 AM

Is that your error message?
Was This Post Helpful? 1
  • +
  • -

#9 kugi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 16-August 13

Re: SDL in MinGW studio: Can't execute

Posted 25 October 2013 - 10:41 AM

My error message:

--------------------Configuration: hello_world - Debug--------------------

hello_world.exe - 0 error(s), 0 warning(s)

And there is window:

--------------------
MinGWStudio X
--------------------
! Cannot execute program!

-------
OK
-------
------------------
Was This Post Helpful? 0
  • +
  • -

#10 Peter O  Icon User is offline

  • D.I.C Head

Reputation: 76
  • View blog
  • Posts: 181
  • Joined: 19-October 13

Re: SDL in MinGW studio: Can't execute

Posted 25 October 2013 - 11:24 AM

What happens if you start the program from the command prompt?
Was This Post Helpful? 2
  • +
  • -

#11 kugi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 16-August 13

Re: SDL in MinGW studio: Can't execute

Posted 29 October 2013 - 03:58 AM

i can't cause pregram doesn't exist. MinGW develper studio CAN'T EXECUTE PROGRAM.
Was This Post Helpful? 0
  • +
  • -

#12 Peter O  Icon User is offline

  • D.I.C Head

Reputation: 76
  • View blog
  • Posts: 181
  • Joined: 19-October 13

Re: SDL in MinGW studio: Can't execute

Posted 29 October 2013 - 06:52 AM

I thought "hello_world.exe - 0 error(s), 0 warning(s)" meant a file named hello_world.exe has been created. Are you sure you looking in the right directory?
Was This Post Helpful? 1
  • +
  • -

#13 kugi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 16-August 13

Re: SDL in MinGW studio: Can't execute

Posted 29 October 2013 - 07:35 AM

yes I am, there are .o file but there isn't .exe file
Was This Post Helpful? 0
  • +
  • -

#14 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3529
  • View blog
  • Posts: 10,931
  • Joined: 05-May 12

Re: SDL in MinGW studio: Can't execute

Posted 29 October 2013 - 08:05 AM

Can you zip up your source, headers, and .CBP file and attach it to this thread? I highly suspect that there is something misconfigured in your project file.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1