Win32 Cygnus Problem

I’ve been tearing my hair out for the past 24 hours trying to get SDL
to work on my windows box. I’ve followed various sets of
instructions, some of which resulted in hour long compiles with few
or no results.

Basically what I need is the simplest way to install the SDL
system into a normal cygwin setup. One promising thing I read suggested
decompressing the development library and placing the .a’s in usr/local/lib,
the .h’s in usr/local/include/SDL and the sdl.dll and sdl-config in
/usr/local/bin

I did this and followed the individuals directions on how to compile a test
program:

gcc -o file.exe file.c sdl-config --cflags --clibs

But to no avail. I’m sure I’m being stupid but I’ve run out of ideas.

Thanks in advance,
Mark Grant

Try forcing the location of the libs and of the includes, for example

gcc -o file.exe file.c -I/usr/include/SDL -lSDL /usr/lib/libSDL_image-1.2.so.0

(at least, in linux it -does- work with me).

I haven’t figured out what sdl-config --cflags --clibs means yet, because gcc simply says to me “unknown folder or file”, while if I execute from the shell
#sdl-config --cflags --clibs

it seems to setup SDL. Am i wrong? (Sam, this is for you…)

15/04/02 21.11.04, “Mark Grant” wrote:>I’ve been tearing my hair out for the past 24 hours trying to get SDL

to work on my windows box. I’ve followed various sets of
instructions, some of which resulted in hour long compiles with few
or no results.

Basically what I need is the simplest way to install the SDL
system into a normal cygwin setup. One promising thing I read suggested
decompressing the development library and placing the .a’s in usr/local/lib,
the .h’s in usr/local/include/SDL and the sdl.dll and sdl-config in
/usr/local/bin

I did this and followed the individuals directions on how to compile a test
program:

gcc -o file.exe file.c sdl-config --cflags --clibs

But to no avail. I’m sure I’m being stupid but I’ve run out of ideas.

Thanks in advance,
Mark Grant

The problem I always seem to come back to is that it can’t find
SDL.h… which is where I put it… Am I supposed to state someplace
the path of all this? I never found out anything which would suggest
that in anything I’ve read, so I assumed that the instructions did
something which would tell the compiler where it was… but it still
isn’t finding it.

Try forcing the location of the libs and of the includes, for example

gcc -o file.exe file.c -I/usr/include/SDL -lSDL /usr/lib/libSDL_image-1.2.so.0

(at least, in linux it -does- work with me).

I haven’t figured out what sdl-config --cflags --clibs means yet, because gcc simply says to me “unknown folder or file”, while if I execute from the shell
#sdl-config --cflags --clibs

it seems to setup SDL. Am i wrong? (Sam, this is for you…)

15/04/02 21.11.04, “Mark Grant” <@Mark_Grant> wrote:On 15 Apr 2002, at 21:47, CRV?ADER/KY wrote:

I’ve been tearing my hair out for the past 24 hours trying to get SDL
to work on my windows box. I’ve followed various sets of
instructions, some of which resulted in hour long compiles with few
or no results.

Basically what I need is the simplest way to install the SDL
system into a normal cygwin setup. One promising thing I read suggested
decompressing the development library and placing the .a’s in usr/local/lib,
the .h’s in usr/local/include/SDL and the sdl.dll and sdl-config in
/usr/local/bin

I did this and followed the individuals directions on how to compile a test
program:

gcc -o file.exe file.c sdl-config --cflags --clibs

But to no avail. I’m sure I’m being stupid but I’ve run out of ideas.

Thanks in advance,
Mark Grant


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

First of all,

The sdl-config syntax is as followed :

sdl-config --cflags --libs and --clibs. This should solve
The problem with linking on Cygwin.

I’ve tested SDL 1.2.4 from source and compiled it on my WIN32
Box with out problems. Also the test programs from SDL 1.2.4
Work with out problems (again :-). Take a look at the compiler
Linkage and flags from the test applications. All done on Cygwin
Btw.

If you want to use SDL, I really advice you to grab the
Mingw32 package from the sdl website : http://www.libsdl.org/Xmingw32/
Complete with zlib, directx, etc. Then get the mingw32 development
Package from the SDL website :

http://www.libsdl.org/release/SDL-devel-1.2.4-mingw32.tar.gz

And unpack these in the gcc-2.95.2 directory. In my opinion the mingw32
Compiler is much better then the Cygwin suite. Mainly since the SDL
Implementation seems slower then when using mingw32 (at least this
Seems to be the case on my Athlon 650) and most importantly, if you
Want to distribute the binary it only needs SDL.dll and not Cygwin1.dll
And SDL.dll (btw, according to the license Cygwin1.dll can’t be
distributed
With the binary. At least this is what I understood) which safes space
And doesn’t make large distribution packages :slight_smile:

I hope this helps.

Regards,

Niels Wagenaar

PS : Sam, the zlib 1.1.3 package for mingw32 should be upgraded to
zlib 1.1.4
since it has a security bug in it.> -----Original Message-----

From: sdl-admin at libsdl.org [mailto:sdl-admin at libsdl.org] On
Behalf Of CRV?ADER/KY
Sent: maandag 15 april 2002 21:48
To: sdl at libsdl.org
Subject: Re: [SDL] Win32 Cygnus Problem

Try forcing the location of the libs and of the includes, for example

gcc -o file.exe file.c -I/usr/include/SDL -lSDL
/usr/lib/libSDL_image-1.2.so.0

(at least, in linux it -does- work with me).

I haven’t figured out what sdl-config --cflags --clibs
means yet, because gcc simply says to me “unknown folder or
file”, while if I execute from the shell #sdl-config --cflags --clibs

it seems to setup SDL. Am i wrong? (Sam, this is for you…)

15/04/02 21.11.04, “Mark Grant” wrote:

I’ve been tearing my hair out for the past 24 hours trying to get SDL
to work on my windows box. I’ve followed various sets of
instructions, some of which resulted in hour long compiles with few
or no results.

Basically what I need is the simplest way to install the SDL
system into a normal cygwin setup. One promising thing I
read suggested
decompressing the development library and placing the .a’s
in usr/local/lib,
the .h’s in usr/local/include/SDL and the sdl.dll and sdl-config in
/usr/local/bin

I did this and followed the individuals directions on how to
compile a
test
program:

gcc -o file.exe file.c sdl-config --cflags --clibs

But to no avail. I’m sure I’m being stupid but I’ve run out of ideas.

Thanks in advance,
Mark Grant


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Behalf Of Mark Grant

The problem I always seem to come back to is that it can’t find
SDL.h… which is where I put it… Am I supposed to state someplace
the path of all this? I never found out anything which would suggest
that in anything I’ve read, so I assumed that the instructions did
something which would tell the compiler where it was… but it still
isn’t finding it.

Ok, check the sdl-config and look at where the prefix is set. If you
Grabbed the mingw32 development package it’s set to
/gcc-2.95.2/i386-mingw32msvc.
Set this to /usr/local. Also, the correct syntax is “SDL/SDL.h” and not
"SDL.h".
It can be used but then you need to tell the compiler where the SDL.h
resides :

-I/usr/local/include/SDL <— This tells that it can find include files
in that dir.

Regards,

Niels Wagenaar> -----Original Message-----

From: sdl-admin at libsdl.org [mailto:sdl-admin at libsdl.org] On
Sent: maandag 15 april 2002 22:13
To: sdl at libsdl.org
Subject: Re: [SDL] Win32 Cygnus Problem

Also, the correct syntax is “SDL/SDL.h” and not “SDL.h”.

No, the correct syntax is “SDL.h”, not "SDL/SDL.h"
If the sdl-config script is configured for your system, it will work correctly.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Well I’ve tried various things various people have suggested, in
particular Niel’s advice on changing the references to SDL.h to
SDL/SDL.h were especially useful although I think I needed to do
some combination of the other things too.

Now however I’ve run into a new problem which I imagine is related
in some way:

/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/…/…/…/…/i686-pc-
cygwin/bin/ld: warn
ing: cannot find entry symbol _WinMainCRTStartup; defaulting to
00401000
/cygdrive/c/WINDOWS.000/TEMP/ccmrRnnU.o(.text+0x413):testga
mma.c: undefined refe
rence to SDL_Init' /cygdrive/c/WINDOWS.000/TEMP/ccmrRnnU.o(.text+0x424):testga mma.c: undefined refe rence toSDL_GetError’
/cygdrive/c/WINDOWS.000/TEMP/ccmrRnnU.o(.text+0x454):testga
mma.c: undefined refe
rence to SDL_Quit' /cygdrive/c/WINDOWS.000/TEMP/ccmrRnnU.o(.text+0x476):testga mma.c: undefined refe rence toSDL_SetVideoMode’
/cygdrive/c/WINDOWS.000/TEMP/ccmrRnnU.o(.text+0x48c):testga
mma.c: undefined refe
rence to SDL_GetError' /cygdrive/c/WINDOWS.000/TEMP/ccmrRnnU.o(.text+0x4ce):testga mma.c: undefined refe rence toSDL_WM_SetCaption’
/cygdrive/c/WINDOWS.000/TEMP/ccmrRnnU.o(.text+0x517):testga
mma.c: undefined refe
rence to SDL_SetGamma' /cygdrive/c/WINDOWS.000/TEMP/ccmrRnnU.o(.text+0x528):testga mma.c: undefined refe rence toSDL_GetError’
/cygdrive/c/WINDOWS.000/TEMP/ccmrRnnU.o(.text+0x567):testga
mma.c: undefined refe
rence to SDL_RWFromFile' /cygdrive/c/WINDOWS.000/TEMP/ccmrRnnU.o(.text+0x572):testga mma.c: undefined refe rence toSDL_LoadBMP_RW’

Any ideas?

You didn’t link the libs, do it manually.

15/04/02 23.25.11, “Mark Grant” wrote:>Well I’ve tried various things various people have suggested, in

particular Niel’s advice on changing the references to SDL.h to
SDL/SDL.h were especially useful although I think I needed to do
some combination of the other things too.

Now however I’ve run into a new problem which I imagine is related
in some way:

/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/…/…/…/…/i686-pc-
cygwin/bin/ld: warn
ing: cannot find entry symbol _WinMainCRTStartup; defaulting to
00401000
/cygdrive/c/WINDOWS.000/TEMP/ccmrRnnU.o(.text+0x413):testga
mma.c: undefined refe
rence to SDL_Init' /cygdrive/c/WINDOWS.000/TEMP/ccmrRnnU.o(.text+0x424):testga mma.c: undefined refe rence toSDL_GetError’
/cygdrive/c/WINDOWS.000/TEMP/ccmrRnnU.o(.text+0x454):testga
mma.c: undefined refe
rence to SDL_Quit' /cygdrive/c/WINDOWS.000/TEMP/ccmrRnnU.o(.text+0x476):testga mma.c: undefined refe rence toSDL_SetVideoMode’
/cygdrive/c/WINDOWS.000/TEMP/ccmrRnnU.o(.text+0x48c):testga
mma.c: undefined refe
rence to SDL_GetError' /cygdrive/c/WINDOWS.000/TEMP/ccmrRnnU.o(.text+0x4ce):testga mma.c: undefined refe rence toSDL_WM_SetCaption’
/cygdrive/c/WINDOWS.000/TEMP/ccmrRnnU.o(.text+0x517):testga
mma.c: undefined refe
rence to SDL_SetGamma' /cygdrive/c/WINDOWS.000/TEMP/ccmrRnnU.o(.text+0x528):testga mma.c: undefined refe rence toSDL_GetError’
/cygdrive/c/WINDOWS.000/TEMP/ccmrRnnU.o(.text+0x567):testga
mma.c: undefined refe
rence to SDL_RWFromFile' /cygdrive/c/WINDOWS.000/TEMP/ccmrRnnU.o(.text+0x572):testga mma.c: undefined refe rence toSDL_LoadBMP_RW’

Any ideas?


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl