1753441 Members
4752 Online
108794 Solutions
New Discussion юеВ

shc compile error

 
Chris Frangandonis
Regular Advisor

shc compile error

Hi all,(GURUS)

I am trying to use a generic shell script compiler ( shc ) on my HP-UX 10.20 but get errors
The errors are :
cc -Wall -O -Ae match.x.c -o match.x
(Bundled) cc: warning 480: The -O option is available only with the C/ANSI C product; ignored.
(Bundled) cc: warning 480: The -A option is available only with the C/ANSI C product; ignored.
(Bundled) cc: "match.x.c", line 110: error 1705: Function prototypes are an ANSI feature.
(Bundled) cc: "match.x.c", line 121: error 1705: Function prototypes are an ANSI feature.
(Bundled) cc: "match.x.c", line 140: error 1705: Function prototypes are an ANSI feature.
(Bundled) cc: "match.x.c", line 157: error 1705: Function prototypes are an ANSI feature.
(Bundled) cc: "match.x.c", line 182: error 1705: Function prototypes are an ANSI feature.
(Bundled) cc: "match.x.c", line 189: error 1705: Function prototypes are an ANSI feature.
(Bundled) cc: "match.x.c", line 241: error 1705: Function prototypes are an ANSI feature.
(Bundled) cc: "match.x.c", line 248: error 1588: "PTRACE_ATTACH" undefined.
(Bundled) cc: "match.x.c", line 262: error 1705: Function prototypes are an ANSI feature.
(Bundled) cc: "match.x.c", line 329: error 1705: Function prototypes are an ANSI feature.
make: *** [match.x] Error 1

The cc compiler that is loaded on the machine is the standard compiler which is installed from the HP-UX instalation. There is no licence for any compilers. Is there away in which the shc compiler can use C/ANSI product.What and How????.

Much appreciated
Chris
8 REPLIES 8
Olav Baadsvik
Esteemed Contributor

Re: shc compile error

Hi,

The error-messages you get tells you that
you are trying to compile ansi-c code
with a compiler that is only a K&R compiler.
The "bundled compiler" that comes with
HP-UX is mainly inteded for building the
kernel and not for program-development.

Regards
Olav
Chris Frangandonis
Regular Advisor

Re: shc compile error

Hi Olav,

Thanks for the info, but is there a compiler that I can use without getting a licence for it and if so where can I get one from that will be able to do the compiling with shc.

Thanks
Chris
Olav Baadsvik
Esteemed Contributor

Re: shc compile error

Hi,

You can search the net for a copy of gcc
(GNU C)
I do not have any experience with it, but a
lot of people use it.
I would advise you to look for a binary
versrion (ready to use) as I know it can
be quite a job to compile the source-code
for gcc

Regards
Olav
Chris Frangandonis
Regular Advisor

Re: shc compile error

Hi,

Is there anyone that can assist me with further info.

Much appreciated
Chris
A. Clay Stephenson
Acclaimed Contributor

Re: shc compile error

I'm not really sure what to add. You've already been given the answer: 1) Purchase the ANSI/C compiler or 2) Download and install the Gnu C Compiler and binutils package.

You can download thes from here:
http://hpux.cs.utah.edu/hppd/hpux/Gnu/gcc-3.0.4/

http://hpux.cs.utah.edu/hppd/hpux/Gnu/binutils-2.11.2/

If you choose to install gcc, you will also need to modify the makefile to call the proper compiler and assembler. You will need to change some compiler options as well. If your package does not have a 'configure' script for GNU C then perhaps your easist and surest option is to purchase a license for ANSI/C.

If it ain't broke, I can fix that.
Chris Frangandonis
Regular Advisor

Re: shc compile error

Hi A.Clay

Thanks for your response. I am not experienced with compilers or installing them. By downloading the gcc and its binutils, will this be effective to use the shc compiler ( generic script compiler). If it is effective could you assist with the method of these procedures in a step by step mode.

Many thanks
Chris
A. Clay Stephenson
Acclaimed Contributor

Re: shc compile error

gcc can certainly produce a workable shc program for you BUT it is not going to work with your current makefile. No, I am not willing to do a step-by-step for you; that's too much sugar for a dime. If you consider your time at all valuable, you can easily burn up the $1500 or so a compiler license costs. It is clear that your make file is crafted for the Ansi/C compiler.
If it ain't broke, I can fix that.
Chris Frangandonis
Regular Advisor

Re: shc compile error

Hi Clay,

Thanks for all the advice.

Chris