Operating System - HP-UX
1753802 Members
7936 Online
108805 Solutions
New Discussion юеВ

Error compiling a C program

 
Javier Ortiz Guajardo
Frequent Advisor

Error compiling a C program

Hi. I am compiling a C program like this
922:/home/h550785/include922 => cc -Ae +DD64 -lm SAP718B.c /usr/lib/librfc.a -lcl -lcurses -o SAP718B
"SAP718B.c", line 322: warning #2181-D: argument is incompatible with
corresponding format string conversion
GETCHAR(iCO11,s); // Convierte la iUbicDesde a string(cadena de carateres)
^

"SAP718B.c", line 327: warning #2181-D: argument is incompatible with
corresponding format string conversion
GETCHAR(iMSC1,s);
^
ld: Unsatisfied symbol "__cxa_personality_routine" in file /usr/lib/librfc.a[rfcilib.o]
1 errors.

This C program was running on a PA-RISK and now i need to run it on an itanium server HP-UX ia64.

Can you help me to solve this warnings.

Thanks
The obstacles are those things that the people see when they left to see their goals.
2 REPLIES 2
H.Merijn Brand (procura
Honored Contributor

Re: Error compiling a C program

Are you sure it is 'C', and not 'C++"?

And what a strange order of arguments you use

# cc +DD64 -Ae +Z -z -o SAP718B SAP718B.c /usr/lib/librfc.a -lm -lcl -lcurses

Doesn't it need some -I arguments?
What's the code look like from line 318 to 330?

Enjoy, Have FUN! H.Merijn [ who doesn't do C==, and has no plans to ]
Enjoy, Have FUN! H.Merijn
Dennis Handly
Acclaimed Contributor

Re: Error compiling a C program

>procura: Are you sure it is 'C', and not 'C++"?

procura is correct, __cxa_personality_routine is part of libCsup, so rfcilib.o must have been compiled with aC++.

If you want to link this you must use aCC. Or librfc must be a shared lib and then you can follow the directions on:
http://docs.hp.com/en/8759/distributing.htm