Re: Calling C++ from C
- From: Gerry Hickman <gerry666uk@xxxxxxxxxxxxxxxx>
- Date: Fri, 04 May 2007 16:44:11 +0100
Hi,
I think you can mix and match C and C++ in the same project, the extern keyword is when you need to do external linkage and need a calling convention. Apparently, the IDE will invoke compilers slightly differently depending on whether you have an *.c or *.cpp file extension on the source file.
See the topic "Using extern to Specify Linkage" in the "Visual C++ Language Reference". This is a good place to start.
Andrew Chalk wrote:
To include C code in a C++ source module I can use
extern "C" ..
From C, can I include C++ code via some easy keyword? Or is this facility just not implemented.
I am using VC v8.0.
Many thanks.
--
Gerry Hickman (London UK)
.
- Prev by Date: Re: HBITMAP CreateDIBitmap()
- Next by Date: Re: How to get VS2005 to replace VS2003 on a Sharepoint Website
- Previous by thread: Re: HBITMAP CreateDIBitmap()
- Next by thread: Re: How to get VS2005 to replace VS2003 on a Sharepoint Website
- Index(es):
Relevant Pages
|