Using 32-bit MinGW and Msys on Windows 7(64 bit), I have compiled and installed SDL-1.2.14, plus the reqs for SDL_image (libpng, libjpeg, libtiff, zlib).
SDL_image-1.2.10 compiled OK.
The SHOWIMAGE test program works fine when I run it from the MSYS shell, but it fails with a message “showimage: FATAL: Couldn’t find showimage.” when I try to run it from the normal Win7 command prompt. I get a similar result from the SDL_ttf test program SHOWFONT and GLFONT.
However, the base SDL test programs like TESTSPRITE work fine from either MSYS or the cmd.exe shell.
I installed SDL and the rest using MSYS with “./configure --prefix=/mingw” and the relevant DLL’s are in I:/mingw/bin. I:/mingw/bin is in the system path.
Other MinGW-compiled applications work just fine when invoked by cmd.exe or from a shortcut, including Dungeon Crawl Stone Soup (console version).
OK, I tried rebuilding my whole MinGW setup. I set up the whole /usr/local installation directory structure, and got all the various components like zlib and libpng to install there correctly. All those installations check out, all the assorted test programs run OK.
SDL-1.3.0-4904. It compiles fine, and the test programs work both from MSYS and from cmd.exe.
So then SDL_image-1.2.10. It compiles OK.
But then I get the same strange result. SHOWIMAGE works OK from MSYS, but not from the win7 command prompt. I get the same message “showimage: FATAL: couldn’t find showimage”.
Win7 is somewhat picky about what programs it will start from the current directory without specifying the full path to the program file. By putting the full or relative path and the “.exe” extension on the name of the command, it executed correctly.
So “showimage PineTree.jpeg” fails, even though it is run from “in” the directory with the showimage program.
".\showimage.exe PineTree.jpeg" works correctly.
However, there are other programs (like the SDL testsprite program) which will run from the current directory without having to give the full path. Go figure.
This looks like a DLL hell problem
(http://en.wikipedia.org/wiki/DLL_hell). Microsoft was supposed to fix
this in the last decade, so they introduced manifest files which
describes the DLL files an executable relies upon. Maybe the semantic
has changed since Windows 7.
BTW, I would be happy to have a working tutorial for compiling all SDL
libraries and their dependancies on Windows 7 with MinGW/MSYS , when you
eventually find the solution to your problem ; because I never succeeded
on Windows XP years ago.
Regards,
IoDream.
Le 24/11/2010 20:31, Fred Stone a ?crit :> OK, I found the problem. I think. Maybe.
Win7 is somewhat picky about what programs it will start from the
current directory without specifying the full path to the program
file. By putting the full or relative path and the “.exe” extension on
the name of the command, it executed correctly.
So “showimage PineTree.jpeg” fails, even though it is run from “in"
the directory with the showimage program.
”.\showimage.exe PineTree.jpeg" works correctly.
However, there are other programs (like the SDL testsprite program)
which will run from the current directory without having to give the
full path. Go figure.