🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.programmer
Article #3388

C++ globals and shared lib, how to ?

#3388
From: Yves Dufournaud
Date: Mon, 01 Feb 1999 00:00
25 lines
1217 bytes
Hi,

I'am trying basic things using dlopen with g++-2.7.2.3 on sunos 5.5 :

I'am loading a file dynamic.o using dlopen
this file is c++ with global object inside.

I've compiled it using 
g++ -shared dynamic.cc -export-dynamic

but when I load it with a dlopen and using RTLD_NOW
constructor of global object are not called.

I don't understand why (my version of g++ generate elf) ?

please help,

thanks,

Yves.

--
Yves Dufournaud Email Yves.Dufournaud at imag.fr equipe MOVI laboratoire
GRAVIR
--
Technical Details
Message-ID: <36B5EA0E.2361@imag.fr>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fc89c,3b56ba1236b2e4f,start
X-Google-Attributes: gidfc89c,public
X-Google-Thread: 11035d,3b56ba1236b2e4f,start
X-Google-Attributes: gid11035d,public
X-Google-Thread: 10ba33,3b56ba1236b2e4f,start
X-Google-Attributes: gid10ba33,public
From: Yves Dufournaud <Yves.Dufournaud@imag.fr>
Subject: C++ globals and shared lib, how to ?
Date: 1999/02/01
Message-ID: <36B5EA0E.2361@imag.fr>
X-Deja-AN: 439434096
Content-Transfer-Encoding: 7bit
Organization: Unite de Recherche INRIA Rhone-Alpes France
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0
Newsgroups: comp.unix.programmer,comp.unix.solaris,gnu.g++.help