Hi,
I’m completely new to SDL and this group and have a question
concerning the installation process of SDL on WinOS with mingw.
I use mingw with gcc 3.2.3, msys 1.0 and I have downloaded
SDL-devel-1.2.7-mingw32.tar.gz.
I found the makefile, started it and saw, that I had to edit it
a little bit (what seemed very strange to me and I guess this
was the start of my error), but I did it and at the end I succeeded:
What I edited:
CWD := $(shell pwd) —> CWD := $(pwd) ### I have no “shell” on WinOS
new:
cp = c:/msys/1.0/bin/cp
mv = c:/msys/1.0/bin/mv
and:
make install-sdl prefix=/usr/localmake —> make install-sdl
prefix=c:/mingw
### there is no /usr/localmake on my system
After that, “make mingw” finished without error and the headers,
libs and the sdl.dll where all at their right places (as I assume).
(I only have a bad feeling, because this makefile has been
intended to be used with mingw, but why doesn’t it originally run on my
system?)
I took a small testfile, which I found anywhere:
// =============================================
#include <stdlib.h>
#include “SDL/SDL.h”
int main()
{
if ( SDL_Init(SDL_INIT_VIDEO) < 0 )
{
fprintf(stderr, “SDL konnte nicht initialisiert werden:
%s\n”, SDL_GetError());
exit(1);
}
atexit(SDL_Quit);
}
// ============================
…and linked it with “-lmingw32 -lSDLmain -lSDL -mwindows” (as it was
adviced at
several places) and got the following error:
c:/mingw/bin/…/lib/gcc-lib/mingw32/3.2.3/…/…/…/libSDLmain.a(SDL_main.o.b)(.text+0x307):
In function console_main': /home/hercules/release/SDL-1.2.4/src/main/SDL_main.c:227: undefined reference to
SDL_main’
mingw32-make.exe: *** [sdl_1.exe] Error 1
Sorry, I have no idea, from what that comes: “/home/hercules/” on a windows
system ???
Is there anybody, who can help me, please?
I’m sure, that hundreds of people had successfully installed SDL with mingw
and there has to be only a silly trick, what I had forgotten …
Thanks for any hints
Gerhard