Operating System - HP-UX
1752808 Members
5780 Online
108789 Solutions
New Discussion юеВ

Re: How to find the installed compiler in HPUX 11.11

 
SOLVED
Go to solution
Dennis Handly
Acclaimed Contributor

Re: How to find the installed compiler in HPUX 11.11

>where we can download the ANSI-C compiler as depot from?

You must purchase it. Or you can download gcc.
http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801/?ciid=e9083a7373f021103a7373f02110275d6e10RCRD
senthil_kumar_1
Super Advisor

Re: How to find the installed compiler in HPUX 11.11

Hi Dennis,

Is gcc is C++ compiler?

what is the download location to gcc compiler?

what is the cost of C-ANSI-Compiler?

Pete Randall
Outstanding Contributor

Re: How to find the installed compiler in HPUX 11.11

> Is gcc is C++ compiler? Yes

> what is the download location to gcc compiler?

http://hpux.connect.org.uk/hppd/hpux/Gnu/gcc-4.2.3/

> what is the cost of C-ANSI-Compiler? $996

https://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=B9007AA


Pete

Pete
senthil_kumar_1
Super Advisor

Re: How to find the installed compiler in HPUX 11.11

Hi All,

I have installed the C-ANSI-Compiler.

How to check whether it is working fine.
Pete Randall
Outstanding Contributor

Re: How to find the installed compiler in HPUX 11.11

> How to check

Uhhhh . . . . . compile something?


Pete

Pete
Raj D.
Honored Contributor

Re: How to find the installed compiler in HPUX 11.11

Senthil:

>I have installed the C-ANSI-Compiler.
>How to check whether it is working fine.


Following steps can be done to check :
1. # swlist -l | grep -i -e C-ANSI -e C++
# swlist -l fileset -a state | grep -i -e C-ANSI -e C++



2. Compile a simple program and check the output:

# vi test1.c # & save the file

#include
main ()
{
printf ("Welcome! This is a test.\n");
printf ("------------------------\n");
}



- Check with : # which cc
[ Make sure this is refereing the correct cc : path for cansi that installed currently. ]

- Compile & execute:
# cc test1.c -o test1
# chmod +x test1 ; ./test1

If output looks ok, you are done.


Cheers,
Raj.



" If u think u can , If u think u cannot , - You are always Right . "
Suraj K Sankari
Honored Contributor

Re: How to find the installed compiler in HPUX 11.11

Hi,
>>How to check whether it is working fine

If you have any c or c++ code then compile the same or else download from net any c/c++ program and compile.

Suraj
Dennis Handly
Acclaimed Contributor

Re: How to find the installed compiler in HPUX 11.11

>Is gcc is C++ compiler?

No, that's a C compiler. You really should use g++ when compiling and linking C++ sources.

>How to check whether it is working fine.

You should see something like this for swlist:
B9007AA B.11.11.20 HP C/aC++ Developer's Bundle

By definition if it is installed, it works fine. :-)
senthil_kumar_1
Super Advisor

Re: How to find the installed compiler in HPUX 11.11

Hi Raj,

I tried your insturction.

But when compiling i am getting following error.

# cc test1.c -o test1
Internal Error: Corrupted codeword in file /opt/aCC/newconfig/aCC.cwd.


Then i checked that file:

# more /opt/aCC/newconfig/aCC.cwd
6429351087c3366d6f30124070


How to solve this?
Raj D.
Honored Contributor

Re: How to find the installed compiler in HPUX 11.11

Senthil,

It looks like a licnese /codeword issue,

Have you applied the HP C++ codeword correctly, that came in a printed paper or you may got from HP licensing support:


Check this link for 'Internal Error: Corrupted codeword' issue :


http://forums11.itrc.hp.com/service/forums/questionanswer.do?&threadId=1290876

http://www.unix.com/hp-ux/25238-ansi-c-compiler-hp-ux-11-11-a.html

hth,
Raj.


" If u think u can , If u think u cannot , - You are always Right . "