public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Claudio Bley <bley@CS.uni-magdeburg.de>
To: gcc-help@gcc.gnu.org
Subject: Re: help with gcc
Date: Wed, 30 Jun 2004 09:19:00 -0000	[thread overview]
Message-ID: <20040630091840.GA3347@connect4.urz.uni-magdeburg.de> (raw)
In-Reply-To: <Pine.GSO.4.53.0406300354440.23936@y.glue.umd.edu>

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

  reply	other threads:[~2004-06-30  9:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-30  7:55 Zhou Xinhui
2004-06-30  9:19 ` Claudio Bley [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-03-22 11:32 Help " sumit.jain
2007-03-22 12:05 ` Andrew Haley
2005-08-16  6:38 Help with GCC Balaji V. Iyer
2005-08-17 19:29 ` James E Wilson
2004-06-30  7:35 help with gcc zxinhui
2002-06-25 14:03 steve goodwin
2001-11-09 22:57 RHONDA VINCENT
2000-06-12 10:58 Help " Archard, Robert
2000-06-18  8:49 ` Martin v. Loewis
1999-10-28  9:14 HELP with GCC Manfred Hofmann (r5108c)
1999-10-31 13:57 ` Manfred Hofmann (r5108c)
1999-10-27 23:50 Manfred Hofmann (r5108c)
1999-10-31 13:57 ` Manfred Hofmann (r5108c)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040630091840.GA3347@connect4.urz.uni-magdeburg.de \
    --to=bley@cs.uni-magdeburg.de \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).