* [Buildroot] problems linking when using -lSDL
@ 2011-02-16 18:38 Steve Morris
2011-02-16 18:56 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Steve Morris @ 2011-02-16 18:38 UTC (permalink / raw)
To: buildroot
Hi All,
I've recently tried to use SDL with buildroot-2010.11 and crosstools-ng
1.82. I've also tried the latest buildroot snapshot wit a fresh
crosstools. I've managed to have everything working prior to trying to
use SDL.`
've been circling around this for days with no luck. Perhaps someone
can point me in the right direction.
ct.c is a simple hello world which doesn't call in anything
#include <stdlib.h>
#include <stdio.h>
int main () {
printf
("hello world\n");
exit(0);
}
my makefile, though perhaps adding too many directories to searc in
compiles the program properly.
CC = /lfs/x-tools/i586-unknown-linux-gnu/bin/i586-unknown-linux-gnu-gcc
CFLAGS = -Wl,--verbose
LDFLAGS =
LDFLAGS += -L/lfs/x-tools/i586-unknown-linux-gnu/i586-unknown-linux-gnu/sys-root/lib
LDFLAGS += -L/lfs/x-tools/i586-unknown-linux-gnu/i586-unknown-linux-gnu/sys-root/usr/lib
LDFLAGS += -L/lfs/x-tools/i586-unknown-linux-gnu/i586-unknown-linux-gnu/sysroot/lib
LDFLAGS += -L/lfs/x-tools/i586-unknown-linux-gnu/i586-unknown-linux-gnu/sysroot/usr/lib
LDFLAGS += -L/lfs/buildroot/output/host/usr/i586-unknown-linux-gnu/sysroot/lib
LDFLAGS += -L/lfs/buildroot/output/host/usr/i586-unknown-linux-gnu/sysroot/usr/lib
LDFLAGS += -lpthread
ct:
$(CC) $(CFLAGS) $(LDFLAGS) -o ct ct.c
When I add -lSDL to the mix I get a bunch of errors such as:
tools/i586-unknown-linux-gnu/lib/gcc/i586-unknown-linux-gnu/4.4.3/../../../../i586-unknown-linux-gnu/bin/ld: warning: libdirectfb-1.4.so.5, needed by /lfs/buildroot/output/host/usr/i586-unknown-linux-gnu/sysroot/usr/lib/libSDL.so, not found (try using -rpath or -rpath-link)
/lfs/x-tools/i586-unknown-linux-gnu/lib/gcc/i586-unknown-linux-gnu/4.4.3/../../../../i586-unknown-linux-gnu/bin/ld: warning: libfusion-1.4.so.5, needed by /lfs/buildroot/output/host/usr/i586-unknown-linux-gnu/sysroot/usr/lib/libSDL.so, not found (try using -rpath or -rpath-link)
/lfs/x-tools/i586-unknown-linux-gnu/lib/gcc/i586-unknown-linux-gnu/4.4.3/../../../../i586-unknown-linux-gnu/bin/ld: warning: libdirect-1.4.so.5, needed by /lfs/buildroot/output/host/usr/i586-unknown-linux-gnu/sysroot/usr/lib/libSDL.so, not found (try using -rpath or -rpath-link)
Any pointers would be appreciated,
Steve
^ permalink raw reply [flat|nested] 2+ messages in thread* [Buildroot] problems linking when using -lSDL
2011-02-16 18:38 [Buildroot] problems linking when using -lSDL Steve Morris
@ 2011-02-16 18:56 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2011-02-16 18:56 UTC (permalink / raw)
To: buildroot
On Wed, 16 Feb 2011 10:38:35 -0800
Steve Morris <morris@buinea.com> wrote:
> LDFLAGS =
> LDFLAGS += -L/lfs/x-tools/i586-unknown-linux-gnu/i586-unknown-linux-gnu/sys-root/lib
> LDFLAGS += -L/lfs/x-tools/i586-unknown-linux-gnu/i586-unknown-linux-gnu/sys-root/usr/lib
> LDFLAGS += -L/lfs/x-tools/i586-unknown-linux-gnu/i586-unknown-linux-gnu/sysroot/lib
> LDFLAGS += -L/lfs/x-tools/i586-unknown-linux-gnu/i586-unknown-linux-gnu/sysroot/usr/lib
> LDFLAGS += -L/lfs/buildroot/output/host/usr/i586-unknown-linux-gnu/sysroot/lib
> LDFLAGS += -L/lfs/buildroot/output/host/usr/i586-unknown-linux-gnu/sysroot/usr/lib
Remove all those LDFLAGS, and do :
CFLAGS += --sysroot=/lfs/buildroot/output/host/usr/i586-unknown-linux-gnu/sysroot/
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-02-16 18:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-16 18:38 [Buildroot] problems linking when using -lSDL Steve Morris
2011-02-16 18:56 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox