libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

statics, dlclose, and libstdc++


From: Wesley W. Terpstra
Subject: statics, dlclose, and libstdc++
Date: Fri, 9 Feb 2001 18:36:15 -0700
User-agent: Mutt/1.3.12i

Hi, I understand there are some problems with C++ under libtool. I believe
I've run into them and was hoping to get a complete explanation so that I
can figure out how to work around these problems.

So, some things I've noticed:
linking a c++ library with libtool does not link to stdc++
linking a c++ program does link to stdc++

Would I be correct in guessing that this is b/c there is no code to locate
the correct libstdc++? So then, linking a program using g++ pulls it in, but
when you need ld for linking libraries you don't know which library to link
to?

If this is all this problem is I'd volunteer my time to writing some shell
script to find the correct stdc++ on all the platforms I have access to.

Next, my real problem: 

I was trying to write a php4 module. It gets dlopened and dlclosed. I am
using c++. When the module gets dlclosed in apache it segfaults. I assume
(from what I've been reading) that this is because I have a couple static
variables in function scope in some of my c++ files and the desctructor is
somehow confused.

What I don't understand is .. why? Doesn't c++ put stuff in the _fini
symbol to clean up it's statics before it's pulled out of memory? 

Is libtool somehow preventing this?

Thanks for clearing this up.

-- 
Wesley W. Terpstra <address@hidden>
Javien Canada Inc. - Linux Developer

Attachment: pgpn9qnhqJeVP.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]