[Kde-bindings] Using smoke with ffi to C

Paulo J. Matos pocm at soton.ac.uk
Sun Oct 15 10:29:16 UTC 2006


On 10/15/06, Ashley Winters <jahqueel at yahoo.com> wrote:
> Paulo,
>
> You have the right idea. The other bindings have an extern "C" hidden somewhere behind all the macros and scripts, but that's how they all work.
>
> Also, you may want to check out the beta releases of QtJambi -- the Trolltech-written binding of Qt4 to Java. It's designed for use through JNI, Java's format of FFI, and makes Qt functions available in straight C. I don't know how easy it is to use for other languages, but it may be worth a look.
>

OK, great! :-D Thanks a lot for all the detail and patience!

Cheers,

Paulo Matos

> - Ashley Winters
>
> ----- Original Message ----
> From: Paulo J. Matos <pocm at soton.ac.uk>
> To: KDE bindings for other programming languages <kde-bindings at kde.org>
> Sent: Friday, October 13, 2006 12:55:37 PM
> Subject: Re: [Kde-bindings] Using smoke with ffi to C
>
> On 10/10/06, Richard Dale <Richard_Dale at tipitina.demon.co.uk> wrote:
> > Ruby itself only has a C interface, and so there are C functions to interface
> > directly with Ruby which contain C++ code that in turn interfaces with the
> > Smoke lib.
>
> This is the part where I just get lost. In fact, I've tried some
> examples with smoke using C++ and everything is nice. So if my
> language could interface with C++ I would be in heaven but that's not
> the case, so I'm still lost. Let me see if I understand. You have to
> create between your language and Smoke a C layer, this C layer is C++
> with extern C. Something along the lines:
>
> extern "C" int myFunction {
>
> // C++ code which calls Smoke
>
> }
>
>
> and then in your language, you just call int myFunction which is C
> (name-mangling-wise). Is this OK?
>
> --
> Paulo Jorge Matos - pocm at soton.ac.uk
> http://www.personal.soton.ac.uk/pocm
> PhD Student @ ECS
> University of Southampton, UK
> _______________________________________________
> Kde-bindings mailing list
> Kde-bindings at kde.org
> https://mail.kde.org/mailman/listinfo/kde-bindings
>
>
>
>
>
> _______________________________________________
> Kde-bindings mailing list
> Kde-bindings at kde.org
> https://mail.kde.org/mailman/listinfo/kde-bindings
>
>
>


-- 
Paulo Jorge Matos - pocm at soton.ac.uk
http://www.personal.soton.ac.uk/pocm
PhD Student @ ECS
University of Southampton, UK



More information about the Kde-bindings mailing list