From owner-freebsd-hackers Wed Mar 10 9:26:51 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from citadel.cdsec.com (citadel.cdsec.com [192.96.22.18]) by hub.freebsd.org (Postfix) with ESMTP id 4D3C115528 for ; Wed, 10 Mar 1999 09:26:44 -0800 (PST) (envelope-from gram@cdsec.com) Received: (from nobody@localhost) by citadel.cdsec.com (8.8.8/8.6.9) id TAA04414 for ; Wed, 10 Mar 1999 19:26:25 +0200 (SAST) Received: by citadel via recvmail id 4411; Wed Mar 10 19:25:50 1999 Message-ID: <36E6AB40.742D64BB@cdsec.com> Date: Wed, 10 Mar 1999 19:26:24 +0200 From: Graham Wheeler X-Mailer: Mozilla 4.08 [en] (X11; I; FreeBSD 2.2.8-RELEASE i386) MIME-Version: 1.0 To: hackers@freebsd.org Subject: C++ global constructors and shared libraries Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi folks I have just changed some C++ code libraries from static to shared. I now find that some global objects declared in these libraries are no longer having their constructors called. If I move the object declarations into the main.cc file, then they work fine. However, I don't want to do this for all the objects - we are talking about 15 libraries here consisting of hundreds of .cc files that would have to be checked. Is there some command line argument that I need for this, or is it a problem with g++/ld on FreeBSD generally? I am using FreeBSD 2.2.7 at present. TIA gram -- Dr Graham Wheeler E-mail: gram@cdsec.com Citadel Data Security Phone: +27(21)423-6065/6/7 Firewalls/Virtual Private Networks Fax: +27(21)24-3656 Internet/Intranet Network Specialists Data Security Products WWW: http://www.cdsec.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message