From owner-freebsd-current Thu Jun 18 16:52:50 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA10101 for freebsd-current-outgoing; Thu, 18 Jun 1998 16:52:50 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from lsd.relcom.eu.net (ache@lsd.relcom.eu.net [193.125.27.73]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA10078 for ; Thu, 18 Jun 1998 16:52:45 -0700 (PDT) (envelope-from ache@lsd.relcom.eu.net) Received: (from ache@localhost) by lsd.relcom.eu.net (8.8.8/8.8.8) id DAA19627; Fri, 19 Jun 1998 03:52:40 +0400 (MSD) (envelope-from ache) Message-ID: <19980619035236.A16953@nagual.pp.ru> Date: Fri, 19 Jun 1998 03:52:36 +0400 From: =?koi8-r?B?4c7E0sXKIP7F0s7P1w==?= To: current@FreeBSD.ORG Subject: Re: How to handle (multiply defined) symbols properly? Mail-Followup-To: current@freebsd.org References: <19980618163540.A19073@nagual.pp.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8bit X-Mailer: Mutt 0.91.1i In-Reply-To: <19980618163540.A19073@nagual.pp.ru>; from ache@nagual.pp.ru on Thu, Jun 18, 1998 at 04:35:40PM +0400 Organization: Biomechanoid Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, Jun 18, 1998 at 04:35:40PM +0400, Андрей Чернов wrote: > I need some functions in libncurses replace some functions in libmytinfo > when they linked together like -lncurses -lmytinfo, but I got > > Definition of symbol `_reset_shell_mode' (multiply defined) > > diagnostics for -static. How to handle it properly? As I found so far, 'weak' may helps for this case. Is it enough to do: #pragma weak reset_shell_mode int reset_shell_mode() in libmytinfo code? -- Andrey A. Chernov http://www.nagual.pp.ru/~ache/ MTH/SH/HE S-- W-- N+ PEC>+ D A a++ C G>+ QH+(++) 666+>++ Y To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message