From owner-freebsd-hackers Wed Apr 17 08:24:05 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id IAA14094 for hackers-outgoing; Wed, 17 Apr 1996 08:24:05 -0700 (PDT) Received: from horst.bfd.com ([204.160.242.10]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id IAA14072 for ; Wed, 17 Apr 1996 08:24:02 -0700 (PDT) Received: from harlie.bfd.com (bastion.bfd.com [204.160.242.2]) by horst.bfd.com (8.7.5/8.7.3) with SMTP id IAA08369 for ; Wed, 17 Apr 1996 08:29:32 -0700 (PDT) Date: Wed, 17 Apr 1996 08:25:58 -0700 (PDT) From: "Eric J. Schwertfeger" To: hackers@freebsd.org Subject: How to make g++ shared libraries? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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: Cvo-24: Global constructors were probably not called. Cvo-25: The application was probably linked improperly Cvo-22: Atom 0 is out of range Abort trap (core dumped) I also noticed that the shared library is smaller than the equivelent unshared library. For those that are curious, Cvo is a c++ library that sits on top of libX11 (no Xt, Xaw, etc), and provides a motif look-and-feel. Its design intention is to allow decent programs with minimal coding, and to generate programs of minimal size (which doesn't work too well when you're linking in c++ static libraries, which is why I'm working on this).