Date: Mon, 12 Dec 1994 17:31:41 -0500 (CDT) From: Aaron Ucko Subject: Re: complex.h To: sorokin AT ps1 DOT iaee DOT tuwien DOT ac DOT at Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Organization: Rockhurst College; Kansas City, MO >[I am new to this list, so excuse me if the subject has already been >beaten to death...] not completely...:-) >First, it reported "class under-defined" or alike at compile time. >Tracing the problem, I found out that file "complex.h" was >UNIX-type, i.e. it #included "Complex.h", which is obviously useless >under DOS. OK, a solution was to copy "complex.h" from older DJGPP, >which correctly included "_complex.h" [if this bug has not been >revealed yet, consider the message as bug report]. strclass.h also is broken--it requests String.h unconditionally. What happened here? >After this, compiler got satisfied, but now linker generates errors >that all functions defined in "_complex.h" are not referenced. I >checked, that libgpp is being found and used (omitting -lgpp produces >errors about stream functions not being found). Browsing libgpp.a it >is possible to find a lot of "...Complex..." references, i.e. Complex >has been compiled into libgpp.a. Did you remember to compile with optimization? GCC won't inline _any_ functions unless you optimize, and tries instead to find the compiled version of the functions in the library (to avoid compiling them multiple times and causing linkage problems...) This problem comes up more often wrt the iostream stuff---I'm surprised all the necessary iostream functions were found. >Now I am totally confused. The only explanation I see is that That optimization misfeature is rather counterintuitive...don't worry. :-) --- Aaron Ucko (ucko AT vax1 DOT rockhurst DOT edu; finger for PGP public key) -=- httyp! -=*=-Just because you're paranoid doesn't mean they aren't out to get you.-=*=- Geek code 2.1 [finger hayden AT vax1 DOT mankato DOT msus DOT edu for explanation]: GCS/M/S d(-) H s g+ p? !au a-- w+ v+ C++(+++)>++++ UL++(-)(S+)>++++ P++ L+(++) 3(-) E-(----) !N>++ K- W-(---) M-(--) V(--) po-(--) Y+(++) t(+) !5 j R G tv--(-) b+++ !D(--) B--(---) e>++++(*) u++(@) h!() f(+) r-(--)>+++ n+(-) y?