Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Morris <morris@buinea.com>
To: buildroot@busybox.net
Subject: [Buildroot] problems linking when using -lSDL
Date: Wed, 16 Feb 2011 10:38:35 -0800	[thread overview]
Message-ID: <20110216183835.GA16325@buinea.com> (raw)

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

             reply	other threads:[~2011-02-16 18:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-16 18:38 Steve Morris [this message]
2011-02-16 18:56 ` [Buildroot] problems linking when using -lSDL Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110216183835.GA16325@buinea.com \
    --to=morris@buinea.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox