kdebindings problem in KDEC

Richard Dale Richard_Dale at tipitina.demon.co.uk
Sat Dec 28 09:40:19 GMT 2002


On Friday 27 December 2002 11:26 pm, Ian Reinhart Geiser wrote:
> Greetings,
> To make qtc be able to be included in libtool
> libraries it seems that we need to supply the
> following code before function stubs in the headers:
>
> #ifdef __cplusplus
> extern "C" {
> #endif
>    ...function declarations here...
> #ifdef __cplusplus
> }
> #endif
I can't see that adding that will do any harm to existing code. So if it's 
possible to do with a sed script, I assume there's still time to fix it in 
the KDE_3_1_BRANCH.

> I have tested this and it seems to only make my tcl,
> perl and ruby bindings work. (currently they only
> export QObject since that is the only file I have
> attacked)  How do I include this code in the function
> blocks?  If I get ambitious and attack each of the 700
> files in that directory, will these changes get
> clobbered?
No, I can add them to the C bindings code generation in the kalyptus utility.

> Any ideas would be helpful.  Also it should be noted
> that all // comment lines and bools should be removed
> from the public headers as they break C builds.
OK - it should be possible to fix that with a sed script too.

> Other than that we qt/c seems to work quite well.
>
> Once this is resolved we will have ocaml, php4, tcl,
> ruby, perl5 and guile bindings for Qt/KDE based off of
> the qtc libraries.
Sounds good. I've been keen on getting some up to date Ruby bindings for KDE 
for a while - but I would have thought the smoke library would be the best 
basis for that. The original SWIG based bindings call Qt or KDE C++ methods 
directly, and don't go via C. Using smoke, you wouldn't have to generate any 
more static code, just implement a dynamic interface for ruby to the smoke 
lib. But I don't know which of the other languages you mention, can call C++ 
directly from the glue code.

BTW - Adam Treat suggested a kde-bindings list to discuss language bindings 
issues. I think that would be a good idea now we've got several different 
bindings projects going.

-- Richard




More information about the kde-core-devel mailing list