help with gcc

zxinhui@isrmail.isr.umd.edu zxinhui@isrmail.isr.umd.edu
Wed Jun 30 07:35:00 GMT 2004


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:



-------------- next part --------------
An embedded message was scrubbed...
From: Zhou Xinhui <zxinhui@Glue.umd.edu>
Subject: no subject
Date: Wed, 30 Jun 2004 03:26:53 -0400 (EDT)
Size: 2483
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20040630/dfc50f01/attachment.eml>


More information about the Gcc-help mailing list