[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Library linking
From: |
Brendan Heading |
Subject: |
Library linking |
Date: |
Sun, 2 Oct 2011 14:29:23 +0100 |
Hi guys,
I'm using GNU make 3.81 on Debian 6.0.2 (Squeeze) and I'm setting up a
project which generates a couple of libraries and then links them with
other stuff later to form an executable, fairly trivial stuff.
I want to use the link library search feature :
all: hello
libhello.a: hellolib.o
$(AR) rcs $@ $^
hello : -lhello hello.o
gcc -o $@ $^
However, this complains that it can't find "-lhello". I ran with -d
and there's no sign of it expanding the -lhello into libhello.a.
Is there something silly I'm missing, or is this feature only intended
to search for pre-existing libraries ?
Brendan