complex data type under egcs/g++

Gabriel Dos Reis Gabriel.Dos-Reis@dptmaths.ens-cachan.fr
Sat Sep 12 03:03:00 GMT 1998


>>>>> Antonio Renato Biral <- pos <biral@ifi.unicamp.br>> wrote:

> Hello folks!

>   I am a newcome about the gnu CC/egcs environment, and I'd like to know 
> how to compile a C++ source code that has a #include<complex.h> line in 
> it.  My aim is to get compiled some arithmetic with complex numbers (like z =
> complex(1.,2.); ), but just the comand line "g++ mytestcode.cpp" seems not
> enough to compile it (I suspect that I am missing some key).

>   The egcs version I am using is the 1.1, and the operational system is a
> Slackware linux.

Standard C++ does not mandate any header file named <complex.h>. The
proper file to consider is <complex> with *no* extension. 

It would helps us to figure out what is happenning if you could show
us a bunch of code that causes you problem. 


-- Gaby
"One reason that life is complex is that it has a 
real part and imaginary part." -- Andrew Koenig



More information about the Gcc mailing list