Via: uk.ac.de-montfort; Mon, 3 Oct 1994 14:08:06 +0100 From: Brian Bramer Date: Mon, 3 Oct 94 14:08:28 BST To: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Problems with using complex numbers There is a problem comiling programs using complex numbers in 2.6.0. The header file contains an error in the line #include which should read #include <_Complex.h> If the -Wall option is on then one gets lots of compile time warnings, e.g.: c:/djgpp/cplusinc/_Complex.h:171: warning: `operator == (const Complex &, const Complex &)' was declared `extern' and later `static' These appear to be caused by function definitions being declared inline whereas previous prototypes were not (just ignore them). One then gets link errors, e.g.: x.cc(.text+0x1f): undefined reference to `Complex::Complex(double, double)' x.cc(.text+0x2f): undefined reference to `Complex::~Complex(void)' A similar problem was reported recently when using the setw(), setiosflags(), etc. manipulators in , e.g.: P13_5.cc(.text+0x85): undefined reference to `operator<<(ostream &, smanip const &)' By undefining the named constant __GNUG__ and recompiling these go away, i.e.: #undef __GNUG__ #include #include Brian Bramer, (bb AT dmu DOT ac DOT uk) De MontFort University, UK.