Subject: getting "readline" to link
To: None <netbsd-help@netbsd.org>
From: Mike Cheponis <mac@Wireless.Com>
List: netbsd-help
Date: 07/21/2005 16:29:48
Man, I though this would be simple:
$ cat program.c
int main(){
char *s;
s=readline(NULL);
return 0;
}
$ cc program.c -o tp -Wl,--rpath -Wl,LIBDIR
/var/tmp//ccWVXCUa.o(.text+0x16): In function `main':
: undefined reference to `readline'
$ echo $LIBDIR
/usr/pkg/lib
$ cc program.c -o program
/var/tmp//ccyyx5oL.o(.text+0x16): In function `main':
: undefined reference to `readline'
$ cc --version
cc (GCC) 3.3.3 (NetBSD nb3 20040520)
NetBSD 2.0 (GENERIC) #0: Wed Dec 1 10:58:25 UTC 2004
builds@build:/big/builds/ab/netbsd-2-0-RELEASE/i386/200411300000Z-obj/big/builds/ab/netbsd-2-0-RELEASE/src/sys/arch/i386/compile/GENERIC
-------------------------------------------------------
Any idea why this isn't linking? I installed devel/readline
from pkgsrc.
Thanks, -Mike