Re: help with gcc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 30, 2004 at 03:55:23AM -0400, Zhou Xinhui wrote:
> hello,
>   I am trying to use complex number to do some matrix
> operation, but I got some error message when I tried to
> compile it with gcc. can someone know what the problem is .
> 
> The following is the test code and the output of compiler
> thanks a lot.

Hello Zhou,

you should compile C++ code with "g++", not with "gcc".

This is the output when running "g++ temp.cpp":

In file included from
/var/tmp/gcc-3.4/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0/backward/complex.h:31,
from temp.cpp:3:
/var/tmp/gcc-3.4/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0/backward/backward_warning.h:32:2:
warning: #warning This file includes at least one deprecated or antiquated
header. Please consider using one of the 32 headers found in section
17.4.1.2 of the C++ standard. Examples include substituting the <X> header
for the <X.h> header for C++ includes, or <iostream> instead of the
deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.


This warning can be easily omitted if you do

/* ---------------------------------------------------------------------- */

#include <cstdio>
#include <complex>

using std::complex; 

/* ---------------------------------------------------------------------- */

Be aware, that there's also complex number support in C99 header "complex.h"
- which is a completely different header than C++'s "complex".

Cheers.
-- 
Claudio

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux