binding - How to use KDE's Smoke? -
i can't smoke is. i've been expecting smoke generate c wrappers c++ code , create header file generated functions.
but running smokegen on c++ headers gives me tiny header, exports pointer smoke class , <sourcename>_smoke_init() function.
what supposed this?
smoke runtime binding generator, kind of gobject-introspection if know that.
that means generates information code binding , makes available library. in order use generated library, must write code against smoke api (which c++ api) information code have generated bindings for, , use smoke api call functions code wrapping.
the example in page http://techbase.kde.org/development/languages/smoke shows how use api call code binding (creating qt widgets hello world example here)
smoke api introduced here http://techbase.kde.org/development/languages/smoke/api_documentation tricky parts, main source of information found smoke.h header.
i have developed c binding ( https://github.com/pankajp/pysmoke/blob/master/include/smokec.h ) smoke in attempt write qt-python binding based on smoke, works simple programs. may find starting point if want use smoke c.
if, instead, interested in exposing small simple c++ library c, without bothering creating subclasses in c (in way) , overriding virtual or protected method, want use existing code without extending in way, might better off writing bindings manually (as did smoke c++ api, though there provided way implement virtual methods in c passing function pointer)
Comments
Post a Comment