Subject: Re: Problem running a ncurses based program
To: None <netbsd-help@netbsd.org>
From: Jan Schaumann <jschauma@netmeister.org>
List: netbsd-help
Date: 02/16/2003 14:09:06
Daniel Bolgheroni <dab__@uol.com.br> wrote:
> I'm trying to run a ncurses based program on NetBSD/i386 - current 1.6M, but I get the following error:
>
> bash-2.05$ gcc -o ncurses_hw.c -g -lncurses ncurses_hw.c
> ld: cannot find -lncurses
>
> What can I do to solve this problem?
If you don't need ncurses but normal curses will do, use -lcurses (and
include curses.h, not ncurses.h).
Otherwise, you will need ncurses from pkgsrc and need to use
-I/usr/pkg/include for the CFLAGS and -L/usr/pkg/lib for the LDFLAGS.
Most likely, you'd also want -Wl,--rpath,/usr/pkg/lib in LDFLAGS as
well.
Check cc(1) for details.
-Jan
--
This one's tricky. You have to use imaginary numbers, like eleventeen...