Date: Wed, 6 Aug 1997 18:10:10 +0200 (CEST) From: Andre Albsmeier <Andre.Albsmeier@mchp.siemens.de> To: freebsd-stable@freebsd.org Subject: Bug in libg++ Makefile Message-ID: <199708061610.SAA01377@curry.mchp.siemens.de>
next in thread | raw e-mail | index | archive | help
Hi, I tried to compile the following program: #include <complex.h> int main(void) { double_complex a(1.0, 0.0),b; b=a+a; printf("b=%f %f\n",real(b),imag(b)); return 0; } It fails during the link stage with the error: /var/tmp/cc0255091.o: Undefined symbol `___pl__FRCt7complex1ZdT0' referenced from text segment However, when I replaced b=a+a with b=a-a everything worked. At least, I found a missing definition in /usr/src/gnu/lib/libstdc++/Makefile: We find SUBCC SUBCF SUBFC defined but only ADDCF ADDFC. After applying the following path everything worked. Is this correct or is there something different wrong (This is the first time I had something to do with g++ :-))? If it is correct, could someone bring it into the STABLE-tree, please? Thanks, Andre *** Makefile.ORI Wed Aug 6 17:41:05 1997 --- Makefile Wed Aug 6 17:39:01 1997 *************** *** 164,170 **** # ======== fcomplex.o ======= FCOMPLEX= -DF ! .for i in MAIN ADD CC ADDCF ADDFC SUBCC SUBCF SUBFC MULCC MULCF MULFC DIVCC \ DIVCF DIVFC PLUS MINUS EQCC EQCF EQFC NECC NECF NEFC ABS ARG POLAR \ CONJ NORM COS COSH EXP LOG POWCC POWCF POWCI POWFC SIN SINH SQRT FCOMPLEX+= -D${i} --- 164,170 ---- # ======== fcomplex.o ======= FCOMPLEX= -DF ! .for i in MAIN ADD CC ADDCC ADDCF ADDFC SUBCC SUBCF SUBFC MULCC MULCF MULFC DIVCC \ DIVCF DIVFC PLUS MINUS EQCC EQCF EQFC NECC NECF NEFC ABS ARG POLAR \ CONJ NORM COS COSH EXP LOG POWCC POWCF POWCI POWFC SIN SINH SQRT FCOMPLEX+= -D${i} *************** *** 206,212 **** # ======== dcomplex.o ======= DCOMPLEX= -DD ! .for i in MAIN ADD CC ADDCF ADDFC SUBCC SUBCF SUBFC MULCC MULCF MULFC DIVCC \ DIVCF DIVFC PLUS MINUS EQCC EQCF EQFC NECC NECF NEFC ABS ARG POLAR \ CONJ NORM COS COSH EXP LOG POWCC POWCF POWCI POWFC SIN SINH SQRT DCOMPLEX+= -D${i} --- 206,212 ---- # ======== dcomplex.o ======= DCOMPLEX= -DD ! .for i in MAIN ADD CC ADDCC ADDCF ADDFC SUBCC SUBCF SUBFC MULCC MULCF MULFC DIVCC \ DIVCF DIVFC PLUS MINUS EQCC EQCF EQFC NECC NECF NEFC ABS ARG POLAR \ CONJ NORM COS COSH EXP LOG POWCC POWCF POWCI POWFC SIN SINH SQRT DCOMPLEX+= -D${i} *************** *** 248,254 **** # ======== ldcomplex.o ======= LDCOMPLEX= -DLD ! .for i in MAIN ADD CC ADDCF ADDFC SUBCC SUBCF SUBFC MULCC MULCF MULFC DIVCC \ DIVCF DIVFC PLUS MINUS EQCC EQCF EQFC NECC NECF NEFC ABS ARG POLAR \ CONJ NORM COS COSH EXP LOG POWCC POWCF POWCI POWFC SIN SINH SQRT LDCOMPLEX+= -D${i} --- 248,254 ---- # ======== ldcomplex.o ======= LDCOMPLEX= -DLD ! .for i in MAIN ADD CC ADDCC ADDCF ADDFC SUBCC SUBCF SUBFC MULCC MULCF MULFC DIVCC \ DIVCF DIVFC PLUS MINUS EQCC EQCF EQFC NECC NECF NEFC ABS ARG POLAR \ CONJ NORM COS COSH EXP LOG POWCC POWCF POWCI POWFC SIN SINH SQRT LDCOMPLEX+= -D${i}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708061610.SAA01377>