This is the mail archive of the
egcs@egcs.cygnus.com
mailing list for the EGCS project. See the EGCS
home page for more information.
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]
Re: Antwort: Re: Constructors and destructors of static variables
- To: Adrian.Trapletti@wu-wien.ac.at
- Subject: Re: Antwort: Re: Constructors and destructors of static variables
- From: Nick Ing-Simmons <nik@tiuk.ti.com>
- Date: Thu, 18 Feb 1999 13:26:40 GMT
- Cc: egcs@egcs.cygnus.com, Dietmar.Kuehl@dvg.de
- Delivered-To: listarch-egcs@egcs.cygnus.com
- Delivered-To: mailing list egcs@egcs.cygnus.com
- In-Reply-To: <36CC0E51.2B861166@wu-wien.ac.at> from Adrian Trapletti on Thu, 18 Feb 1999 12:57:53 +0000
- Mailing-List: contact egcs-help@egcs.cygnus.com; run by ezmlm
- Organization: via, but not speaking for : Texas Instruments Ltd.
- References: <C125671C.002F30BD.00@s101ln07.dvg.de> <36CC0E51.2B861166@wu-wien.ac.at>
- Reply-To: Nick Ing-Simmons <nik@tiuk.ti.com>
- Sender: owner-egcs@egcs.cygnus.com
- Sender: Nick Ing-Simmons <nik@tiuk.ti.com>
Adrian Trapletti <Adrian.Trapletti@wu-wien.ac.at> writes:
>It is in fact very simple, just use
>
>g++ -shared -o X.so X.o
>
>instead and the constr. and destr. are called as desired.
>Even if X.so is used by some high level Mathprogram, such as
>R, which is written in plain C, the constr. and destr. are called as desired.
>
>> Nick Ing-Simmons (nik@tiuk.ti.com) wrote:
>> BEWARE - you are using cout which is itself a static object.
>> It is quite possible that Y::Y() is being called before cout
>> has been constructed (the C++ IO is not linked to your X.so).
So I had the right fix (link with g++), but wrong reason (include IO) ;-)
Glad it was easy.
--
Nick Ing-Simmons <nik@tiuk.ti.com>
Via, but not speaking for: Texas Instruments Ltd.