Curses, foiled again.

Nick Estes plug-discuss@lists.plug.phoenix.az.us
Sat, 4 May 2002 20:27:17 -0700 (MST)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Your link errors might just vanish if you try linking it with the curses
library.

cc bedit.c -lcurses (or perhaps -lncurses depending on your system)

	--Nick


On Sat, 4 May 2002, foodog wrote:

> I know this belongs on the developers list, but I'm not susbscribed to
> it, rarely code anymore, and beseach thee to gimme a break.
>
> I'm trying to port a program written in VAX C circa 1988 that uses
> Curses library calls. When I try to build it I get a bunch of errors,
> specifically:
>
> [steve@gemini steve]$ cc bedit.c
> /tmp/ccNUfExw.o: In function `main':
> /tmp/ccNUfExw.o(.text+0x14e): undefined reference to `initscr'
> /tmp/ccNUfExw.o(.text+0x172): undefined reference to `newwin'
> /tmp/ccNUfExw.o(.text+0x1d2): undefined reference to `endwin'
> /tmp/ccNUfExw.o: In function `edit_buffer':
> /tmp/ccNUfExw.o(.text+0x369): undefined reference to `wprintw'
> /tmp/ccNUfExw.o(.text+0x39d): undefined reference to `wmove'
> /tmp/ccNUfExw.o: In function `first_screen':
> /tmp/ccNUfExw.o(.text+0x414): undefined reference to `wrefresh'
> /tmp/ccNUfExw.o: In function `key_not_supported':
> /tmp/ccNUfExw.o(.text+0x5b4): undefined reference to `werase'
> ... etc. etc. etc.
> collect2: ld returned 1 exit status
>
> I'm including stdio.h and curses.h.  The functions are listed in
> curses.h so I'm hoping there's some compiler switch I'm missing out on.
> Also note:
> $ rpm -qa | grep curses
> ncurses-5.2-12
> ncurses-devel-5.2-12
>
> Anybody got a hint?  TIA,
> Steve
> ________________________________________________
> See http://PLUG.phoenix.az.us/navigator-mail.shtml if your mail doesn't post to the list quickly and you use Netscape to write mail.
>
> PLUG-discuss mailing list  -  PLUG-discuss@lists.plug.phoenix.az.us
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: pgpenvelope 2.10.2 - http://pgpenvelope.sourceforge.net/

iD8DBQE81Kaav+hjYTGg7s4RAt4YAJ4ktUIcFqLOUlilWJkWNCeUi/qv0ACbB22R
ugWcZarq5+J4kdsVSFqF83w=
=nsxL
-----END PGP SIGNATURE-----