From owner-freebsd-questions Thu May 21 23:24:35 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA17754 for freebsd-questions-outgoing; Thu, 21 May 1998 23:24:35 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from lucy.bedford.net (lucy.bedford.net [206.99.145.54]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id XAA17719 for ; Thu, 21 May 1998 23:24:26 -0700 (PDT) (envelope-from listread@lucy.bedford.net) Received: (from listread@localhost) by lucy.bedford.net (8.8.8/8.8.8) id BAA14604; Fri, 22 May 1998 01:43:13 -0400 (EDT) (envelope-from listread) Message-Id: <199805220543.BAA14604@lucy.bedford.net> Subject: Re: Linking static with ncurses? In-Reply-To: <199805220114.VAA01043@spoon.beta.com> from "Brian J. McGovern" at "May 21, 98 09:14:09 pm" To: mcgovern@spoon.beta.com (Brian J. McGovern) Date: Fri, 22 May 1998 01:43:13 -0400 (EDT) Cc: questions@FreeBSD.ORG Reply-to: djv@bedford.net From: CyberPeasant X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Brian J. McGovern wrote: > This is kind of a dumb question, and its probably a configuration error > someplace, but when I try to use the ncurses libaries, and link dynamically > (I'm assuming the default), everything works fine. However, if I try to link > statically, I get: > > ../bin/dbfe dbfe.o msqldb.o dialogs.o field_edit.o forms.o > picks.o keys.o -lmsql -lncurses -ltermcap -ltermlib [snip many unresolved symbols] > Whats the blatently obvious thing I'm missing? > -Brian Well, it's not blatantly obvious, but I believe that adding -lmytinfo will cure the problem. As far as I'm concerned, libncurses.a is broken. The cur_term symbol (the one I picked for diagnosis,) is defined in libncurses.so : [djv@castor lib]$ nm libncurses.so.3.1 | grep cur_term 00000004 C _cur_term [djv@castor lib]$ but not in libncurses.a : [djv@castor lib]$ nm libncurses.a | grep cur_term U _cur_term ... more of these ... U _cur_term [djv@castor lib]$ cur_term is /data/, a piece of global data. It (and some others) are declared in /usr/include/term.h Dave -- Unix System 7: an improvement on all other Unix releases, previous and subsequent. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message