Cross-compiling SDL demo programs for pxa255

I’ve just cross-compiled the SDL libraries (1.2.7) for use on the linux
framebuffer on an embedded PXA255 arm board. I specified
–prefix=/usr/local/arm After configuring I su root, make install, ldconfig,
and then exit back to my user login.

In the /test directory I ran configure and got:

checking for SDL - version >= 1.2.7… no
*** The sdl-config script installed by SDL could not be found
*** If SDL was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the SDL_CONFIG environment variable to the
*** full path to sdl-config.
configure: error: *** SDL version 1.2.7 not found!

I don’t fully understand pkg-config. Should I be using it? If the .h files
are in /usr/local/arm/src and the libs are in /usr/local/arm/lib then what’s
the problem?

All help appreciated. sorry if this is a basic question. they’re all basic
once you know the answer :wink:

Ant

This is now driving me nuts. I tried compiling the testsprite program
manually rather than using the configure script and make. Here’s what I
tried and what I got:

$ arm-linux-gcc -c testsprite.c -I /usr/local/arm/include/SDL/
$ arm-linux-gcc -o testsprite testsprite.o -L /usr/local/arm/lib/ -lSDL
testsprite.o: In function LoadSprite': testsprite.o(.text+0x20): undefined reference toSDL_RWFromFile’
testsprite.o(.text+0x30): undefined reference to SDL_LoadBMP_RW' testsprite.o: In functionMoveSprites’:
testsprite.o(.text+0x58c): undefined reference to sin' testsprite.o: In functionmain’:
testsprite.o(.text+0x1308): undefined reference to SDL_PollEvent' /usr/local/arm/lib//libSDL.a(SDL_cursor.o): In functionSDL_SetCursor’:
/usr/local/src/SDL-1.2.7/src/video/SDL_cursor.c:217: undefined reference to
`SDL_GetMouseState’

This probably has a really trivial solution, but without it I’m stuck.

Can someone help?

Ant

I’ve just cross-compiled the SDL libraries (1.2.7) for use on the linux
framebuffer on an embedded PXA255 arm board. I specified
–prefix=/usr/local/arm After configuring I su root, make install,
ldconfig,> and then exit back to my user login.

In the /test directory I ran configure and got:

checking for SDL - version >= 1.2.7… no
*** The sdl-config script installed by SDL could not be found
*** If SDL was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the SDL_CONFIG environment variable to the
*** full path to sdl-config.
configure: error: *** SDL version 1.2.7 not found!

I don’t fully understand pkg-config. Should I be using it? If the .h files
are in /usr/local/arm/src and the libs are in /usr/local/arm/lib then what’s
the problem?

All help appreciated. sorry if this is a basic question. they’re all basic
once you know the answer :wink:

Ant

-----BEGIN PGP SIGNED MESSAGE-----On Monday 22 March 2004 04:09 pm, Ant Allen wrote:

This is now driving me nuts. I tried compiling the testsprite program
manually rather than using the configure script and make. Here’s what I
tried and what I got:

$ arm-linux-gcc -c testsprite.c -I /usr/local/arm/include/SDL/
$ arm-linux-gcc -o testsprite testsprite.o -L /usr/local/arm/lib/ -lSDL
testsprite.o: In function LoadSprite': testsprite.o(.text+0x20): undefined reference toSDL_RWFromFile’
testsprite.o(.text+0x30): undefined reference to SDL_LoadBMP_RW' testsprite.o: In functionMoveSprites’:
testsprite.o(.text+0x58c): undefined reference to sin' testsprite.o: In functionmain’:
testsprite.o(.text+0x1308): undefined reference to SDL_PollEvent' /usr/local/arm/lib//libSDL.a(SDL_cursor.o): In functionSDL_SetCursor’:
/usr/local/src/SDL-1.2.7/src/video/SDL_cursor.c:217: undefined reference to
`SDL_GetMouseState’

Try using sdl-config --libs instead of `-L/usr/local/arm/lib -lSDL’, that
might help you link against the right library.

Good luck.

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: noconv

iQCVAwUBQF+PwEagrZ9eMssBAQEdqgP8D521MN8CEW1dIH39AP6VLQEm7CY/1rFf
vEFUlWLKApT+T64iMYyyI7e+k3FbC3ik7nqbAEDiajSN2l9bitBPsd9YVDL9WmYa
1fka6BnZTwTcvdK6knMlSYG8kf4YwudKt4watV2XcK/fTMfET+tteoSTioPdOjBx
L4wlzm8VdCE=
=WoSN
-----END PGP SIGNATURE-----

Try using sdl-config --libs instead of `-L/usr/local/arm/lib -lSDL’,
that
might help you link against the right library.

sdl-config doesn’t seem to have been installed. Where should it be, and how
do I get it?

Ant—
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.638 / Virus Database: 409 - Release Date: 21/03/2004

-----BEGIN PGP SIGNED MESSAGE-----On Tuesday 23 March 2004 02:21 am, Ant Allen wrote:

sdl-config doesn’t seem to have been installed. Where should it be, and
how do I get it?

Under FreeBSD it is located in /usr/local/bin, run `whereis sdl-config’ to
find it on your system. The sdl-config script is installed whenever you
install the sdl-devel package, or whenever you install from source. Perhaps
you do not have the sdl-devel package installed, or you are missing some
portions of the package.

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: noconv

iQCVAwUBQGDlXUagrZ9eMssBAQFshQP+JToGoCdrB7zpGAU/Fhs/uiNM/bX6AOH0
NEZjWifOeGzEM3/m6LLXhxBFP7IZYpoLPfsgwXxnRZMPHhvEElsBkVoFV58gvlly
Af07gIiiQxisUMfvUDqhf05Kfnj3KbX2JW0Afdk3W494nj3K8WIhTq+My8pxte82
XFZxf2ZsvuQ=
=ASf0
-----END PGP SIGNATURE-----