1833744 Members
3004 Online
110063 Solutions
New Discussion

compiling C-sources

 
SOLVED
Go to solution
Ceesjan van Hattum
Esteemed Contributor

compiling C-sources

Hi,

I took some perfectly compilable C-sources from a 10.20 OS to 11.00. The code uses some libraries, give me some headage.

First of all, on 10.20 i used a Ansi-C compiler, on 11.00 i can only use the default cc.
Using -DPOSIX and -DANSI seems to go just fine, but the alian code included gives me:

#make -f nj.m
cc -Ae -c -O -DDLPI_20 -DDEBUG -DNPI_20 -I../inc -I/usr/xmcapi/include -I/usr/include ../src/njmddmain.c
(Bundled) cc: warning 480: The -A option is available only with the C/ANSI C product; ignored.
(Bundled) cc: warning 480: The -O option is available only with the C/ANSI C product; ignored.
(Bundled) cc: "/usr/xmcapi/include/macros.h", line 59: error 1000: Unexpected symbol: "*".
(Bundled) cc: "/usr/xmcapi/include/macros.h", line 60: error 1000: Unexpected symbol: "*".
(Bundled) cc: "/usr/xmcapi/include/macros.h", line 61: error 1000: Unexpected symbol: "*".
(Bundled) cc: "/usr/xmcapi/include/macros.h", line 62: error 1000: Unexpected symbol: "*".
(Bundled) cc: "/usr/xmcapi/include/macros.h", line 63: error 1000: Unexpected symbol: "*".
(Bundled) cc: "/usr/xmcapi/include/macros.h", line 63: error 1000: Unexpected symbol: "QHead".
(Bundled) cc: "/usr/xmcapi/include/apitypes.h", line 68: error 1000: Unexpected symbol: "octet".
(Bundled) cc: "/usr/xmcapi/include/apitypes.h", line 69: error 1000: Unexpected symbol: "octet".
(Bundled) cc: "/usr/xmcapi/include/apitypes.h", line 74: error 1000: Unexpected symbol: "octet".
(Bundled) cc: "/usr/xmcapi/include/apitypes.h", line 75: error 1000: Unexpected symbol: "octet".
(Bundled) cc: "/usr/xmcapi/include/apitypes.h", line 76: error 1000: Unexpected symbol: "octet".
(Bundled) cc: "/usr/xmcapi/include/p7api.h", line 127: error 1000: Unexpected symbol: "*".
(Bundled) cc: "/usr/xmcapi/include/p7api.h", line 129: error 1000: Unexpected symbol: "*".
(Bundled) cc: error 2017: Cannot recover from earlier errors, terminating.
*** Error exit code 1

Ofcourse, i can delete the -O and -A flags, but no changes on this...
Where do i need to look ?
Points will be given...
5 REPLIES 5
Helen French
Honored Contributor

Re: compiling C-sources

A. Clay Stephenson
Acclaimed Contributor
Solution

Re: compiling C-sources

Hi:

Unless you are willing to translate all of your ANSI C to K&R, you will need to purchase the ANSI C compiler or the C++ (aCC) compiler. The ANSI C compiler speaks both ANSI and K&R; aCC speaks C++ and ANSI C.

Plan B. Download and install gcc from any a\of the HP-UX Porting Centre's.
If it ain't broke, I can fix that.
Ceesjan van Hattum
Esteemed Contributor

Re: compiling C-sources

Using plan B, with gcc i know have the error:

/usr/ccs/bin/ld: Unsatisfied symbols:
strerror_r (code)
collect2: ld returned 1 exit status

I cannot find the reason, anybody suggestions?
Steven Gillard_2
Honored Contributor

Re: compiling C-sources

The _r (re-entrant function API) has been obsoleted on HPUX 11.0. Check your code, and change any strerror_r() calls to strerror().

Regards,
Steve
Ceesjan van Hattum
Esteemed Contributor

Re: compiling C-sources

FYI,
My alien c-source is now correctly compiled by gcc. strerror_r and others as well as some compiling options (CFLAGS and LIBs) had to be modified, but this saved us two investments.
Thanks and greetings,
Ceesjan