This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
help with gcc
- From: Zhou Xinhui <zxinhui at Glue dot umd dot edu>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 30 Jun 2004 03:55:23 -0400 (EDT)
- Subject: help with gcc
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.
#include <stdio.h>
#include <complex.h>
int main(int argc, char **argv)
{
complex<double> Z ;
if (argc < 3)
{
printf(" f1 \n") ;
}
else
{
printf(" f2 \n") ;
}
return 0 ;
}
downlink:~/upload: gcc temp.cpp
Undefined first referenced
symbol in file
complex<double>::complex(double, double)/var/tmp/ccKJjqSH.o
complex<double>::imag(void) const /var/tmp/ccKJjqSH.o
complex<float>::imag(void) const /var/tmp/ccKJjqSH.o
complex<long double>::imag(void) const/var/tmp/ccKJjqSH.o
complex<double>::real(void) const /var/tmp/ccKJjqSH.o
complex<float>::real(void) const /var/tmp/ccKJjqSH.o
complex<long double>::real(void) const/var/tmp/ccKJjqSH.o
complex<float>::complex(float, float)/var/tmp/ccKJjqSH.o
complex<long double>::complex(long double, long
double)/var/tmp/ccKJjqSH.o
ld: fatal: Symbol referencing errors. No output written to
a.out
collect2: ld returned 1 exit status
downlink:~/upload: