>>>> "sb" == SL Baur <steve(a)xemacs.org>
writes:
sb> William Perry <wmperry(a)aventail.com> writes in xemacs-beta(a)xemacs.org:
> SL Baur wrote:
>> Qt uses C++ constructors and
>> destructors and thus is impossible to use under the current XEmacs
>> architecture.
> Why do you say that?
sb> Based on past experiences with egcs/the new gcc. Constructor stuff
sb> can get called before main() and before we have a chance to take any
sb> of our usual precautions. I don't fully understand the technical
sb> details, but it was giving me corrupted memory and when I asked one of
sb> the now-gcc maintainers about how to turn off global constructors,
sb> explaining briefly XEmacs startup & dumping, I was told that dumping
sb> was stupid and deserved to lose.
This issue only applies to global objects. Global objects are rarely
used (and never needed). The design pattern "singleton" is made to
address this.
There's no big magic to the gcc implementation of global constructors
on any architecture I am familiar with. I'm not sure what the details
of your issue were, but I'll bet it's not difficult to fix.
I have so far kept my $0.02 out of this, but personally if I had to
write any GUI I would certainly not want to use a C API. I would much
rather use a C++ API, particularly a professionally implemented one
like QT.