Subject: Re: getting "readline" to link
To: Mike Cheponis <netbsd-help@NetBSD.org, mac@Wireless.Com>
From: Hubert Feyrer <hubertf@gmx.de>
List: netbsd-help
Date: 07/22/2005 14:20:33
In article <Pine.NEB.4.62.0507211625140.922@S.Culver.Net> you wrote:
> $ cc program.c -o tp -Wl,--rpath -Wl,LIBDIR
> /var/tmp//ccWVXCUa.o(.text+0x16): In function `main':
> : undefined reference to `readline'
You need to tell the compiler to link in the readline library, with
-lreadline.
The -Wl,--rpath etc. only tells it where to look for libraries at runtime
(or at link-time if you pass -L), but that's not enough - it won't
auto-guess what libs you need. :)
- Hubert