On 10.02.2009, at 15:32, Jamie Clark wrote:
> Thanks for replies.
>
> I just learned that it is much easier to bind haskell to C functions
> than C++ functions.
>
> Would it be doable to "compile" C++ into C so I can do
> straightforward bindings to C functions (we have a program that
> reads in C header files and create bindings for it)? Or not worth
> the effort?
There is no "C" interface to FLTK. You could of course wrap all calls
in the form of
void Fl_Widget::draw() {...}
with a "C" function
extern "C" void fl_widget_draw(Fl_C_Widget *w) { ((Fl_Widget*)w)-
>draw(); }
but that would probably be just as much work as writing the Haskell
wrapper, plus you would lose all the advantages of object oriented
programming.
----
http://robowerk.com/
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk