Try modifying sdl-config
with “-mno-cygwin” instead of putting
"-mno-cygwin" in your makefile. I’m attaching a version from my system
(modified from SDL 1.2.2, not from 1.2.4 – I’m too lazy to upgrade
-MarkOn Tue, 4 Jun 2002, Seba wrote:
I am getting crazy trying to install sdl on cygwin. I already looked the
faqs and
the list archives, but nothing help.
I downloaded SDL-devel-1.2.4-mingw32.tar.gz, extracted the
i386-mingw32msvc.tar.gz
file into /usr/local/cross-tools and did a symlink from
/usr/local/bin/sdl-config
to /usr/local/cross-tools/i386-mingw32msvc/bin/sdl-config
Then I tried to compile a very simple test program like this:
gcc -o test.exe test.c ?sdl-config --cflags --libs?
And i get a lot of undefined references from SDL_main.c to _imp___iob
I fixed this passing -mno-cygwin to the compilation line, as i have read
in the list archives:
gcc -o test.exe test.c ?sdl-config --cflags --libs? -mno-cygwin
Then I go to SDL-1.2.4/test/ and tried to do a ./configure
I also get a lot of undefined references like the others.
What should i do?
I have reinstalled cygwin from scratch yesterday, so i think it doesn’t
the problem.
PD: Sorry for my bad english.
–
Sebastian Garcia <s_garcia at speedy.com.ar>
Usuario Linux registrado #225450
Debian GNU/Linux ‘Sid’ kernel 2.4.18 sobre AMD K6 II
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl
–
Mark K. Kim
http://www.cbreak.org/
PGP key available upon request.
-------------- next part --------------
#!/bin/sh
prefix=/usr/local/cross-tools/i386-mingw32msvc
exec_prefix=${prefix}
exec_prefix_set=no
usage=“
Usage: sdl-config [–prefix[=DIR]] [–exec-prefix[=DIR]] [–version] [–libs] [–cflags]”
if test $# -eq 0; then
echo “${usage}” 1>&2
exit 1
fi
while test $# -gt 0; do
case “$1” in
-=) optarg=echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'
;;
*) optarg= ;;
esac
case $1 in
–prefix=)
prefix=$optarg
if test $exec_prefix_set = no ; then
exec_prefix=$optarg
fi
;;
–prefix)
echo $prefix
;;
–exec-prefix=)
exec_prefix=$optarg
exec_prefix_set=yes
;;
–exec-prefix)
echo $exec_prefix
;;
–version)
echo 1.2.2
;;
–cflags)
if test ${prefix}/include != /usr/include ; then
# Handle oddities in Win32 path handling (assumes prefix)
prefix=echo ${prefix} | sed 's,^//\([A-Z]\),\1:,'
includes=-I${prefix}/include
fi
echo $includes -I${prefix}/include/SDL -Dmain=SDL_main -mno-cygwin
;;
--libs)
libdirs="-L${exec_prefix}/lib "
echo $libdirs -lmingw32 -lSDLmain -lSDL -mwindows -mno-cygwin
;;
--static-libs)
–libs|–static-libs)
libdirs="-L${exec_prefix}/lib "
echo $libdirs -lmingw32 -lSDLmain -lSDL -mwindows -luser32 -lgdi32 -lwinmm -ldxguid -mno-cygwin
;;
*)
echo "${usage}" 1>&2
exit 1
;;
esac
shift
done