Re: [xplc-general] Re: strange behavior in xplc_ptr
Cross-platform lightweight components
Status: Alpha
Brought to you by:
pphaneuf
|
From: Avery P. <ape...@ni...> - 2005-08-23 14:07:01
|
On Tue, Aug 23, 2005 at 02:39:15AM -0400, Pierre Phaneuf wrote: > Well... You hacks rely on global constructors working, which doesn't > work portably. > > On enlightened platforms such as Linux/gcc, they do, but on some odd and > not-so-odd platforms, they still don't work right in all circumstances > (for example, some only work if they are in the main binary, nothing in > shared library will work, other will work in shared libraries, but only > if they are linked to your binary, not if they are dynamically loaded, > etc, etc, etc). But this discussion is about statically linking modules into your binary, so global constructors really should work. If some platforms still can't do global constructors in the main binary, then they're living in the stone age and they *certainly* don't implement C++. (wvlinkerhack itself doesn't use global constructors. But you'll have to use them if you want the linked-in object files to auto-register themselves with XPLC.) Have fun, Avery |