Works in debug, not from command line?

Hi,

       I am new to SDL and still a novice programmer... 


           I have a simple program that displays a .bmp

i can run debug and the window and surface are created, and the .bmp
is displayed… like it should…

When I compile and run the program normally, the .bmp doesn’t show
up (without errors) ???

       Any thoughts on this?

                       Thanks,
                               Paul Gaynor

Hi,

      I am new to SDL and still a novice programmer...


          I have a simple program that displays a .bmp

i can run debug and the window and surface are created, and the .bmp
is displayed… like it should…

When I compile and run the program normally, the .bmp doesn’t show
up (without errors) ???

The only thing that I can think of is the path to the .bmp correct. (Note:
My reply is worthless since I am also a newbie in SDL>From: Paul Gaynor

Reply-To: sdl at libsdl.org
To: sdl at libsdl.org
Subject: [SDL] works in debug, not from command line?
Date: Sun, 29 Jul 2001 18:23:37 -0400


Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

       I am new to SDL and still a novice programmer...
           I have a simple program that displays a .bmp

i can run debug and the window and surface are created, and the .bmp
is displayed… like it should…
When I compile and run the program normally, the .bmp doesn’t show
up (without errors) ???

Hmm… In your program, do you call SDL_Flip after drawing to the surface?
And I assume you are using SDL_BlitSurface, and when you use that, do NOT
lock and unlock the surface. Only do that when you are accessing the memory
yourself. Try also running it in fullscreen (or windowed, if you’re not in
fullscreen). Sounds funny, but maybe that’s the problem (I dunno, maybe the
WM asked you to redraw but you aren’t checking for events? not familiar with
that aspect).

Also, what platform are you using? Linux, Windows? Any other useful
information (ie fb device or X under Linux)?–
~StoverTech~
Benjamin Joel Stover

Hi,

What directory is the BMP file in? VC++ normally creates the
Debug EXE in a sub-dir (relative to the Project file) named Debug
and that is probably where you put your BMP file. The VC++ settings
for the project let you specify a working directory for Debug and
Release, but if you are just running the release EXE from Explorer
you will need to make sure the BMP is in the same folder (unless you
specified the path in the Image load call.

Hope this helps,

From: sdl-admin@libsdl.org [mailto:sdl-admin at libsdl.org]On Behalf Of
Paul Gaynor
Sent: Sunday, July 29, 2001 5:24 PM
To: sdl at libsdl.org
Subject: [SDL] works in debug, not from command line?

Hi,

       I am new to SDL and still a novice programmer... 


           I have a simple program that displays a .bmp

i can run debug and the window and surface are created, and the .bmp
is displayed… like it should…

When I compile and run the program normally, the .bmp doesn’t show
up (without errors) ???

       Any thoughts on this?

                       Thanks,
                               Paul Gaynor

SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl