SDL-devel-1.2.4-mingw33.tar.gz broken?

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 <@Seba>
Usuario Linux registrado #225450
Debian GNU/Linux ‘Sid’ kernel 2.4.18 sobre AMD K6 II

Are you running on Windows or Linux?

Here is information that I updated recently:
http://www.libsdl.org/Xmingw32/

-Sam Lantinga, Software Engineer, Blizzard Entertainment

I just don’t get it (probably since I don’t program in C++), why isn’t
it enough to use the header files in the program together with the
binary libraries?
Why do people need to link SDL directly into their programs???

RK.

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

Romi Kuntsman wrote:

I just don’t get it (probably since I don’t program in C++), why isn’t
it enough to use the header files in the program together with the
binary libraries?
Why do people need to link SDL directly into their programs???

This doesn’t have anything to do with C++. I don’t know about this guy,
but most of the people who want to statically link it are worried about
distributing the final program. It is a lot easier to make sure that
people have the right version of the SDL libraries if you statically
link them into the binary that you distribute.

It appears to be legal under the LGPL to statically link and distribute
that form of the program as long as you also make available a
dynamically linked version of the program or make available the .o files
so that people who get the program can relink it.>

RK.

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


±-----------------------------------------+

  • Bob Pendleton, an experienced C/C++/Java +
  • UNIX/Linux programmer, researcher, and +
  • system architect, is seeking full time, +
  • consulting, or contract employment. +
  • Resume: http://www.jump.net/~bobp +
  • Email: @Bob_Pendleton +
    ±-----------------------------------------+

Bob Pendleton wrote:

Romi Kuntsman wrote:

I just don’t get it (probably since I don’t program in C++), why
isn’t it enough to use the header files in the program together with
the binary libraries?
Why do people need to link SDL directly into their programs???

This doesn’t have anything to do with C++. I don’t know about this
guy, but most of the people who want to statically link it are worried
about distributing the final program. It is a lot easier to make sure
that people have the right version of the SDL libraries if you
statically link them into the binary that you distribute.

First of all, it sure has something to do with C++, at least in this
case. Because I don’t know how can I statically link SDL with my program
which is written in Delphi, when the SDL source code is in C++.

I could also be worried that if I’ll statically link, any future changes
that might be important (e.g. critical bug fixes) will not be available
to my program.
Yes, I know, I have to provide the source code for people to be able to
recompile it… but to recompile is not the easiest thing in the world -
you have understand it, you have to have the appropriate compiler, you
have to download the source code (which might be very big), etc.

Isn’t it just easier to dynamically link and include the .dll or .so
files of the last verstion you know works with your program in the
distibution?

RK.

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 :slight_smile:

-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

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 :slight_smile:

Thanks, it work great.On Tue, 4 Jun 2002 13:57:35 -0700 (PDT) “Mark K. Kim” wrote:


Sebastian Garcia <@Seba>
Usuario Linux registrado #225450
Debian GNU/Linux ‘Sid’ kernel 2.4.18 sobre AMD K6 II