Message-ID: <3492D24C.A392551@gmx.net> Date: Sat, 13 Dec 1997 19:22:04 +0100 From: Robert Hoehne MIME-Version: 1.0 To: Mike McLean CC: DJGPP Mailing list Subject: Re: C & C++ mixed? References: <349215bb DOT 9779905 AT news DOT primenet DOT com> <34931a9a DOT 11027695 AT news DOT primenet DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk Mike McLean schrieb: > > // part from luth.h the header file > > // Prototypes for File routines > > void fileSave(void); > Change this to: #ifdef _cplusplus extern "C" #endif void fileSave(void); > // function in file.cpp > > void fileSave(void) and this to: extern "C" void fileSave(void) This is needed when you want to use functions from C++ in C. For the header files you can use also the trick (if you have more than one prototype) #ifdef _cplusplus extern "C" { #endif /* Now all you prototypes in the normal notation */ #ifdef _cplusplus } #endif Robert -- ****************************************************** * email: Robert Hoehne * * Post: Am Berg 3, D-09573 Dittmannsdorf, Germany * * WWW: http://www.tu-chemnitz.de/~sho/rho * ******************************************************