From: kagel AT quasar DOT bloomberg DOT com Date: Thu, 26 Dec 1996 16:26:59 -0500 Message-Id: <9612262126.AA27847@quasar.bloomberg.com > To: panosts AT hiway DOT gr Cc: djgpp AT delorie DOT com In-Reply-To: <199612270005.WAA06404@cosmos.hiway.gr> (panosts@hiway.gr) Subject: Re: Cannot Link PDCURSES To C++ Programs. Reply-To: kagel AT dg1 DOT bloomberg DOT com From: "Panos Platon Tsapralis" Date: Thu, 26 Dec 1996 22:06:11 +0200 I experience a strange problem : I write a program that uses the PD_Curses package. The file name extension of the program is ".c" and it flawlessly compiles & links. When I rename it to ".cpp" extension, it compiles but during linking it complains about "Undefined references to .." all Curses-specific functions that I use. What is it that I do wrong ? I have not tried PDCurses by it looks like the header file(s) is(are) not C++ aware. Try adding the following to you own code: #if defined(__cplusplus) extern "C" { #endif #include <> #if defined(__cplusplus) } #endif -- Art S. Kagel, kagel AT quasar DOT bloomberg DOT com A proverb is no proverb to you 'till life has illustrated it. -- John Keats