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

Re: C++

From: Jiang Tao <jiangt@ceci.mit.edu>
Date: Sat, 17 Feb 1996 17:33:39 -0500
Message-Id: <312657C3.59E2B600@ceci.mit.edu>
To: holmberg@frame.com
Cc: Jiang Tao <jiangt@ceci.mit.edu>, www-lib@w3.org
holmberg@frame.com wrote:
> 
>  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.
> 
> Greg

You got the point. I should compile the lib with c++ compiler 
(MSVC has option "disable language extension" off as default,
so I should turn it on).

However, it seems a lot of compiler errors when I begin
to compile lib with c++ compiler both on UNIX (sun, CC) and
windows NT, what should I do then?

-- 
Tao Jiang     Visiting Scientist,            E40-369, CECI, MIT
phone:        (617)-253-3514(o)  (617)-576-9665 (h)
email:   jiangt@ceci.mit.edu    URL:  http://ceci.mit.edu/staff/jiangt/
Received on Saturday, 17 February 1996 17:33:47 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:26 GMT