On Tue, 14 Dec 1999, Chris Jones wrote:

> Hi
> James Henstridge <> wrote:
> > 
> > As for using C++ libraries from C programs, one way is to compile your C 
> > program with a C++ compiler. 
> Presumably this means I'll be able to create instances of objects and call
> their methods? If so, that sounds like a good solution.

This solution is basically saying `use C++ instead of C'.  Since C++ is a
superset (more or less) of C, you can just code straight C, and only use
the extensions needed to access the library.

> > The other way is to write a wrapper for the 
> > entry points you are going to use. 
> Don't suppose you have (or know of) any example code that does this?

The Qt C bindings probably do something like this.  I haven't tested them,
so can't say for certain though.

> Thanks for the info,
> Chris Jones


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]