From owner-freebsd-hackers Wed Apr 17 16:28:50 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id QAA24071 for hackers-outgoing; Wed, 17 Apr 1996 16:28:50 -0700 (PDT) Received: from genesis.atrad.adelaide.edu.au (genesis.atrad.adelaide.edu.au [129.127.96.120]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id QAA24059 for ; Wed, 17 Apr 1996 16:28:41 -0700 (PDT) Received: from msmith@localhost by genesis.atrad.adelaide.edu.au (8.6.12/8.6.9) id IAA10712; Thu, 18 Apr 1996 08:51:07 +0930 From: Michael Smith Message-Id: <199604172321.IAA10712@genesis.atrad.adelaide.edu.au> Subject: Re: How to make g++ shared libraries? To: ejs@bfd.com (Eric J. Schwertfeger) Date: Thu, 18 Apr 1996 08:51:07 +0930 (CST) Cc: hackers@FreeBSD.org In-Reply-To: from "Eric J. Schwertfeger" at Apr 17, 96 08:25:58 am MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk Eric J. Schwertfeger stands accused of saying: > > > Well, I got no response on questions, so I'll take this to hackers. > > I'm trying to create a shared version of the Cvo (Cray Visual Objects) > c++ library, but it isn't working. I followed the same steps that I do > to make regular c shared libraries (gcc with -c and -fpic, then > ld -Bshareable to create the libCvo.so.1.0. This creates a library that > I can link against, but when I try to execute the resulting program, I > get: Are you doing this as a port, or for your own personal work? Shared libraries are easy to build under FreeBSD, but the technique isn't terribly portable. Basically, you want a makefile that includes : LIB= SRCS= SHLIB_MAJOR= SHLIB_MINOR= .include If you want to do this as part of a port, make a makefile like this, and study the link process that it uses. -- ]] Mike Smith, Software Engineer msmith@atrad.adelaide.edu.au [[ ]] Genesis Software genesis@atrad.adelaide.edu.au [[ ]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[ ]] realtime instrument control (ph/fax) +61-8-267-3039 [[ ]] Collector of old Unix hardware. "Where are your PEZ?" The Tick [[