[SDL] SDL 1.2.3 and cygwin under win98
Mattias Brändström
brasse at ludd.luth.se
Sat Feb 16 12:55:01 PST 2002
Hello again!
I added -lcrtdll and that solved almost everything. Now i get this
stange message:
/home/brasse/lib/SDL-1.2.3/i386-mingw32msvc/lib/libSDLmain.a(SDL_main.o.b):
In function `console_main':
/home/hercules/SDL-1.2.3/src/main/SDL_main.c:227: undefined reference to
`SDL_main'
collect2: ld returned 1 exit status
make: *** [pong] Error 1
This is strange for two reasons... 1) /home/hercules does not exist on
my system and 2) I have a SDL_main(int, char**) function in main.cpp
which compiles to main.o.
Any clues? My Makefile is attached.
Regards,
Mattias
nwagenaar at digitaldynamics.nl wrote:
> I had this problem also in the beginning but I've managed to fix
> this in a rather non-standard way.
>
> When I want to compile a WIN32 version of my SDL program and I want
> to use console output (which standard is not done but put in the
> stdout.txt and stderr.txt files) I use the following in my Makefile:
>
> LIBS = -Dmain=SDL_main -L/lib/mingw -lcygwin -lSDLmain -lSDL -lwinmm
> -lmsvcrt -lcrtdll
>
> If I want to use stdout.txt and stderr.txt I use the following :
>
> LIBS = -L/lib/mingw `/usr/local/bin/sdl-config --libs` -lcrtdll
>
> With the latest Cygwin update I get errors at undefined references with
> the CRT DLL so I use -lcrtdll (found in /lib/mingw) which solves it :)
>
> Also make sure you compile the sourcefiles using
> `/usr/local/bin/sdl-config --cflags`.
>
> This should work but I can't garrantee it ofcourse.
>
> Regards,
>
> Niels Wagenaar
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Makefile
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20020216/8789b4b9/attachment.txt>
More information about the SDL
mailing list