From: Javier Gonzalez (jgonzalez@conatel.com.uy)
Date: Fri Nov 15 2002 - 12:33:44 EST
Much thanks to all giving help on my issue --> Braher, Heartman, Sutton
and Depascale.
For some unknown reason the tiny test program compiled OK unmodified on
another machine ( same C.03.25 aCC version but 32-bit OS ) and also
works untouched on A.03.27 aCC version as Sutton kindly takes a break to
give it a try.
But you were right saying that swaping two lines ( math.h and cmath ),
taking off the leading include/ on math.h ( <include/math.> ) and adding
a new one at the top ( string.h ) would resolve the issue.
The modified prueba3.c code that gave no errors is:
#include <string.h>
#include <iostream.h>
#include <math.h>
#include <cmath>
int main()
{
int x,y;
cout << "Enter an integer: ";
cin >> x;
y = x * 2;
cout << "\n" << y <<" is twice " << x <<".\n";
(root)Fel//app> aCC -v prueba2.c
/opt/aCC/lbin/ctcom -inst compiletime -diags 523 -D __HP_CXD_SPP=1 -D
__hppa -c
/usr/ccs/bin/ld -o a.out /opt/langtools/lib/crt0.o -u ___exit -u main -L
/opt/1
removing /var/tmp/AAAa12972
removing prueba2.o
One more thing on what you would probably want to drop a line is why
<include/math.h> is found in cmath instead of <math.h> since both being
in /opt/aCC/include directory.
How could it be explained math.h includes cmath and cmath includes
<include/math.h> ??
At the bottom is the original post.
Best regards,
javier
--- Ing. Javier González Arenas Departamento de Ingeniería Soluciones IT Conatel S.A. Ejido 1690 - Montevideo, CP 11200 - Uruguay Tel. (+598) (2) 902 0314* ext. 2374 Fax (+598) (2) 902 4926 ext. 2365 Servicio de Atención al Cliente: (+598) (2) 902 4926* http://www.conatel.com.uy/ --- -----Mensaje original----- De: Javier Gonzalez [mailto:jgonzalez@conatel.com.uy] Enviado el: Viernes, 15 de Noviembre de 2002 11:07 Para: hpux-admin@DutchWorks.nl Asunto: [HPADM] aCC compile errors 328 and others Hi there, trying to compile just a little test program with aCC some errors are reported and the program is not compiled. I'm using B3913DB C.03.25 HP aC++ Compiler (S800) running on B.11.00.01 English HP-UX 64-bit Runtime Environment. PATH is set as follows: PATH=/usr/sbin:/usr/bin:/opt/ansic/bin:/usr/ccs/bin:/opt/perl/bin:/usr/c ontrib/bin :/opt/nettladm/bin:/opt/fc/bin:/opt/fcms/bin:/opt/upgrade/bin:/opt/pd/bi n:/usr/bin/X11 :/usr/contrib/bin/X11:/opt/hparray/bin:/opt/langtools/bin:/opt/imake/bin :/opt/aCC/bin :/opt/networker/bin:/sbin:/home/root:/opt/vnc:/opt/netscape The program was taken from the help and cmath and include/math.h were added just to test if the include works well: #include <iostream.h> #include <cmath> #include <include/math.h> int main() { int x,y; cout << "Enter an integer: "; cin >> x; y = x * 2; cout << "\n" << y <<" is twice " << x <<".\n"; } Next is the aCC output. Thanks in advance for any hint you can provide. Best regards, javier (root)Fel//app/csql> aCC -v prueba2.c /opt/aCC/lbin/ctcom -inst compiletime -diags 523 -D __HP_CXD_SPP=1 -D __hppa -c Error 328: "/opt/aCC/include/iostream/iostream.h", line 320 # Function 'memcpy' has not been defined yet; cannot call. memcpy(x_pptr,s,n) ; ^^^^^^ Error 328: "/opt/aCC/include/iostream/iostream.h", line 330 # Function 'memcpy' has not been defined yet; cannot call. memcpy(s,x_gptr,n) ; ^^^^^^ Error 328: "/opt/aCC/include/cmath", line 36 # Function 'fabs' has not been defined yet; cannot call. inline double abs(double d) { return fabs(d); } ^^^^ Error 328: "/opt/aCC/include/cmath", line 41 # Function 'acosf' has not been defined yet; cannot call. inline float acos (float x) { return acosf(x); } ^^^^^ Error 328: "/opt/aCC/include/cmath", line 42 # Function 'asinf' has not been defined yet; cannot call. inline float asin (float x) { return asinf(x); } ^^^^^ Error 328: "/opt/aCC/include/cmath", line 43 # Function 'atanf' has not been defined yet; cannot call. inline float atan (float x) { return atanf(x); } ^^^^^ Error 403: "/opt/aCC/include/cmath", line 44 # Undeclared variable 'atan2f'. Perhaps 'atan2' as in "float atan2(float,float)" ["/opt/aCC/include/cmath", line 44] was intended. inline float atan2(float x, float y) { return atan2f(x, y); } ^^^^^^ Error 328: "/opt/aCC/include/cmath", line 45 # Function 'cosf' has not been defined yet; cannot call. inline float cos (float x) { return cosf(x); } ^^^^ Error 328: "/opt/aCC/include/cmath", line 46 # Function 'coshf' has not been defined yet; cannot call. inline float cosh (float x) { return coshf(x); } ^^^^^ Error 328: "/opt/aCC/include/cmath", line 47 # Function 'expf' has not been defined yet; cannot call. inline float exp (float x) { return expf(x); } ^^^^ Error 328: "/opt/aCC/include/cmath", line 48 # Function 'fmodf' has not been defined yet; cannot call. inline float fmod (float x, float y) { return fmodf(x, y); } ^^^^^ Error 328: "/opt/aCC/include/cmath", line 49 # Function 'logf' has not been defined yet; cannot call. inline float log (float x) { return logf(x); } ^^^^ Error 699: "/opt/aCC/include/cmath", line 49 # Error limit reached; halting compilation. inline float log (float x) { return logf(x); } --- Ing. Javier González Arenas Departamento de Ingeniería Soluciones IT Conatel S.A. Ejido 1690 - Montevideo, CP 11200 - Uruguay Tel. (+598) (2) 902 0314* ext. 2374 Fax (+598) (2) 902 4926 ext. 2365 Servicio de Atención al Cliente: (+598) (2) 902 4926* http://www.conatel.com.uy/ <http://www.conatel.com.uy/> --- -- ---> Please post QUESTIONS and SUMMARIES only!! <--- To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl Name: hpux-admin@dutchworks.nl Owner: owner-hpux-admin@dutchworks.nl Archives: ftp.dutchworks.nl:/pub/digests/hpux-admin (FTP, browse only) http://www.dutchworks.nl/htbin/hpsysadmin (Web, browse & search)
This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:22 EDT