W3C home > Mailing lists > Public > www-lib@w3.org > January to March 1996

Re: C++

From: <holmberg@frame.com>
Date: Fri, 16 Feb 96 15:34:51 PST
Message-Id: <9602162334.AA16642@bertrand>
To: Jiang Tao <jiangt@ceci.mit.edu>
Cc: www-lib@w3.org
 As other parts of my application
> are written with c++, so I hope HTCallClient() will be in
> a c++ file, but this seems to cause compiler error as the
> lib is written with c ( you can call c function in c++ program,
> however, you can not call c++ function in c program, at least
> with MSVC). 

It's true you can't call a C++ function from a C function
compiled with a C compiler.  But you can call a C function
compiled with a C++ compiler, which in turn can call a
C++ function.  I.e., write some wrappers around your
C++ code in C, compile them with the C++ compiler, and
use these as your callbacks.

Received on Friday, 16 February 1996 18:31:05 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:46 UTC