[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: kde binary building is not portable :(
From: Lubos Lunak <l.lunak () suse ! cz>
Date: 2002-11-26 12:46:28
[Download RAW message or body]
On Monday 25 November 2002 16:32, Benjamin Reed wrote:
[snip]
>
> ...their change makes foo.cpp contain an "extern int kdemain()" as it's
> main function, and then the dummy files (foo_main.cpp and
> libfoo_main.cpp) actually each contain a main() that just call the
> kdemain().
Actually, kdeinit shouldn't call main(). Search for __KCC in
kdelibs/kinit/kinit.cpp . The simple reason why the code generated by KCC
aborts when main() is called second time is because one is not allowed by C++
standard to call main() twice (I don't know which section, I also think it
just simply says that main() can't be called recursively and a pointer to it
can't be taken).
In other words, main() should be called only once when starting application
(really starting, no dlopening or forking). libfoo_main.cpp should have e.g.
kdeinit_main().
--
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o. e-mail: l.lunak@suse.cz , l.lunak@kde.org
Drahobejlova 27 tel: +420 2 9654 2373
190 00 Praha 9 fax: +420 2 9654 2374
Czech Republic http://www.suse.cz/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic