[SDL] Problem building sample program

David Annett sdl at annett.co.nz
Wed Mar 5 01:21:23 PST 2008


Hi,
I'm trying to set up the dev environment to build a Linux SDL based 
game. I'm using a standard Ubuntu 7.10 setup and installed SDL with 
apt-get from the Debian repository.

To start simple I tried to build the example programs found in 
/usr/share/doc/libsdl1.2-dev/examples/examples.tar.gz but the 
configuration process fails thus:

---- paste ----
david at rabota:~/Dev/temp/test$ ./configure
configure: error: cannot find install-sh or install.sh in 
./../build-scripts
---- end paste ----
but build-scripts is not present.

Plan B was to make the simple testver.c program using this makefile:

-------- makefile --------
CC=gcc
CFLAGS=-I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
LDFLAGS=-L/usr/lib -lSDL


testver : testver.o
  ${CC} ${LDFLAGS} -o testver testver.o


testver.o : testver.c
  ${CC} ${CFLAGS} -c testver.c
--------- end makefile -------

But this too fails with this cryptic result:

---- paste ----
david at rabota:~/Dev/temp/test$ make
gcc  -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c testver.c
gcc  -L/usr/lib -lSDL -o testver testver.o
/usr/local/bin/ld: unrecognized option '--hash-style=both'
/usr/local/bin/ld: use the --help option for usage information
collect2: ld returned 1 exit status
make: *** [testver] Error 1
---- end paste ----

I have no idea where '--hash-style=both' is coming from!
The only unusual thing I can think about my dev enviroment is I have the 
gcc ARM tool chain installed too but they have 'arm' prefixed to the 
tools so should not be the problem, I hope.

As per the FAQ docs here is some info on my system:

---- paste ----
david at rabota:~/Dev/temp/test$ which sdl-config
/usr/bin/sdl-config
david at rabota:~/Dev/temp/test$ sdl-config --version
1.2.11
david at rabota:~/Dev/temp/test$ locate libSDL
/usr/lib/libSDL_image-1.2.so.0
/usr/lib/libSDL-1.2.so.0
/usr/lib/libSDL.a
/usr/lib/libSDL.la
/usr/lib/libSDL_image-1.2.so.0.1.4
/usr/lib/libSDLmain.a
/usr/lib/libSDL.so
/usr/lib/libSDL-1.2.so.0.11.0
david at rabota:~/Dev/temp/test$ tail config.log
## confdefs.h. ##
## ----------- ##

#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""

configure: exit 1
---- end paste ----

Any suggestions how get it working would be welcomed!

Thanks in advance
-- 

David Annett

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the SDL mailing list