Subject: Re: Problem running a ncurses based program
To: Daniel Bolgheroni <dab__@uol.com.br>
From: Miguel Mendez <flynn@energyhq.homeip.net>
List: netbsd-help
Date: 02/16/2003 20:04:06
--=.EI7uS6XeClVJ6i
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

On Sun, 16 Feb 2003 15:43:29 -0300
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?

Do you have the ncurses package installed? If so, you have to tell the
linker where it is:

cc -g -o ncurses_hw -L/usr/pkg/lib -lncurses -Wl,-R/usr/pkg/lib -Wl,--export-dynamic ncurses_hw.c

Cheers,
-- 
        Miguel Mendez - flynn@energyhq.homeip.net
        GPG Public Key :: http://energyhq.homeip.net/files/pubkey.txt
        EnergyHQ :: http://www.energyhq.tk
        Of course it runs NetBSD!

--=.EI7uS6XeClVJ6i
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (NetBSD)

iD8DBQE+T+CpnLctrNyFFPERAuayAJ4pafj91wUfLxhyPBF1Dy7If2fmlACgvESa
RrfIrTAPg5i1+EVhLQscqa0=
=WIsT
-----END PGP SIGNATURE-----

--=.EI7uS6XeClVJ6i--