Clemens Hintze wrote:
> 
> >>>>> "Jon" == Jon Aseltine <aseltine / cs.umass.edu> writes:
> 
>     Jon> I asked once, but perhaps I wasn't clear enough. Is it
>     Jon> possible to implement an extension module for a C++ library
>                                                    ^^^^^^^^^^^^^^^^^
> 
> And again, you are not clear enough (sorry to say!) ;-)
> 
>     Jon> (for example, TrollTech's QT library)? The README.EXT file
>     Jon> focuses on C libraries, not C++.
...
> If you want to do it manually, you have to pay attention to certain
> points. Roughly spoken, you have to wrap the C++ library to be useable
> under Plain C! Then you can also wrap it for Ruby! You couldn't use
> classes on the C interface side! And you have to look for name
> mangeling that a C++ compiler do. For example the Init_<extension>
> function has to use C linkage and naming instead of C++ one!
> 
> Then you have to write functions for every method you want to call!
> This because C cannot call the method of an instance. Last but not
> least you would have to compile you extension with a C++ compiler and
> do not forget to link-in the C++ runtime library (e.g. libstdc++).

I don't know much about these issues, but aren't various C++ interface
hassles one of the reasons for the increasing interest in Gnome/GTK
among non-C++ users?

FYI, there is a Ruby/Qt entry in the RAA. (And Ruby/GTK too.)

-- 
Conrad Schneiker
(This note is unofficial and subject to improvement without notice.)