[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bindings
Subject:    Re: [Kde-bindings] Using smoke with ffi to C
From:       Ashley Winters <jahqueel () yahoo ! com>
Date:       2006-10-15 2:44:24
Message-ID: 20061015024424.96022.qmail () web50915 ! mail ! yahoo ! com
[Download RAW message or body]

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.

- Ashley Winters

----- Original Message ----
From: Paulo J. Matos <pocm@soton.ac.uk>
To: KDE bindings for other programming languages <kde-bindings@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@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@kde.org
https://mail.kde.org/mailman/listinfo/kde-bindings





_______________________________________________
Kde-bindings mailing list
Kde-bindings@kde.org
https://mail.kde.org/mailman/listinfo/kde-bindings


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic