Re: MIME



There is probably something to do this in the camel library, which is part
of the evolution mail client.  I don't know if there is any released
library that does this though.

As for using C++ libraries from C programs, one way is to compile your C
program with a C++ compiler.  The other way is to write a wrapper for the
entry points you are going to use.

The wrapper would be a C++ file where each function was defined as:
  extern "C" rettype funcname(args) {
    /* code to do some C++ stuff */
  }

This means that funcname will not be mangled, so it can be used from C.
Now you should be able to access the library from C source files.  Note
that for cross platform portability, the file containing the main()
function should be compiled with the C++ compiler (even if it doesn't use
any C++ features).  Note that this isn't strictly necessary when using gcc
on linux, but it may be necessary on other platforms.

James.

--
Email: james@daa.com.au
WWW:   http://www.daa.com.au/~james/


On Tue, 14 Dec 1999, Chris Jones wrote:

> Hi
> 
> Does GNOME contain a library similar to KDE's mimelib? (Ie a library that can be used to create or parse MIME messages)
> 
> If not, could someone give me some hints on a good way to access a C++ library (mimelib is C++ sadly) from C?
> 
> Many thanks,
> 
> Chris Jones
> 
> 
> -- 
> To unsubscribe: mail gnome-devel-list-request@gnome.org with "unsubscribe"
> as the Subject.
> 



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