Operating System - HP-UX
1829549 Members
1967 Online
109992 Solutions
New Discussion

How to compile something file by HP C/aC++ compiler?

 
SOLVED
Go to solution
Mousa55
Super Advisor

How to compile something file by HP C/aC++ compiler?

Hi All,

i have HP C/aC++ compiler evaluation copy, and i am buy the license of this product and i receiving the 16 HEX digit and 26 HEX digit codeword without CD's, that to activate this copy.
but my questions how to compile something file by c++ compiler? that to check if the EVL copy it is activated or no?, because i don't, have any experience on this application.

thanks and best regards
19 REPLIES 19
Srimalik
Valued Contributor
Solution

Re: How to compile something file by HP C/aC++ compiler?

Create a file named test.c having the following contents(excluding hashes):

#######
#include

int main()
{
printf("Working\n");
return(0);
}

#######

now try tp compile the above file with aCC
do:

aCC test.c -o test

if it does not give any errors and creates a file named test all is OK.

you can now execute test as:

./test

it should print "Working"

-Sri
abandon all hope, ye who enter here..
Srimalik
Valued Contributor

Re: How to compile something file by HP C/aC++ compiler?

I think this thread is related to:

https://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1300041

:-)

-Sri
abandon all hope, ye who enter here..
Mousa55
Super Advisor

Re: How to compile something file by HP C/aC++ compiler?

Hi All,

this error message it is appeared after execute aCC command,
# more test.c
nclude

int main()
{
printf("Working\n");
return(0);
}
# aCC test.c -o test
Internal Error: Corrupted codeword in file /opt/aCC/newconfig/aCC.cwd.

the last questions
How i can save text file with ASCII code?

thanks
Srimalik
Valued Contributor

Re: How to compile something file by HP C/aC++ compiler?

seems that something is wrong with the codeword.

BTW, the has just before include is required. The first line should be:

#include

-Sri
abandon all hope, ye who enter here..
Mousa55
Super Advisor

Re: How to compile something file by HP C/aC++ compiler?

Hi All,

thanks, but How i can save text file with ASCII code?
because i don't see the ASCII in Encoding option when i save a text file, only ANSI and Unicode and another.

thanks
Srimalik
Valued Contributor

Re: How to compile something file by HP C/aC++ compiler?

>but How i can save text file with ASCII code?
because i don't see the ASCII in Encoding option when i save a text file, only ANSI and Unicode and another.

Which editor are u using?
abandon all hope, ye who enter here..
Srimalik
Valued Contributor

Re: How to compile something file by HP C/aC++ compiler?

If you have the key with you, you can do this instead of using an editor.

On the prompt do:

echo "your key" > /opt/aCC/newconfig/aCC.cwd

-Sri
abandon all hope, ye who enter here..
Mousa55
Super Advisor

Re: How to compile something file by HP C/aC++ compiler?

Hi All,

only i want to copy 26 HEX digit ASCII text file to this directory /opt/aCC/newconfig/aCC.cwd, how i do it that?.

and this the output of this command

echo 123456 > /opt/aCC/newconfig/aCC.cwd

/usr/bin/ksh: /opt/aCC/newconfig/aCC.cwd: cannot create

thanks
Dennis Handly
Acclaimed Contributor

Re: How to compile something file by HP C/aC++ compiler?

>how to compile something file by C++ compiler? that to check if the EVL copy it is activated or no?

Use touch to create an empty foo.C file. Then compile that.

>I don't have any experience on this application.

You're using it for a reason, someone should know C++.

>Internal Error: Corrupted codeword in file /opt/aCC/newconfig/aCC.cwd.

You don't have the proper codeword setup yet.

>How I can save text file with ASCII code?

Use vi.

>/usr/bin/ksh: /opt/aCC/newconfig/aCC.cwd: cannot create

You need to be root. The easiest would be to put it in a file then copy it in place.
Srimalik
Valued Contributor

Re: How to compile something file by HP C/aC++ compiler?

I see you assigned some points, did u get aCC working?

-Sri
abandon all hope, ye who enter here..
Mousa55
Super Advisor

Re: How to compile something file by HP C/aC++ compiler?

Hi All,

No is still not solve, but i assigned some points, for thread Which asked some questions and received answers to.
but i still don't know how to save text file with ascii code.

thanks and best regards
Steven Schweda
Honored Contributor

Re: How to compile something file by HP C/aC++ compiler?

> but i still don't know how to save text
> file with ascii code.

I don't mean to be unkind, but if you can't
create a text file, and you can't even _run_
a C compiler, how did you get the job of
installing this thing?
Mousa55
Super Advisor

Re: How to compile something file by HP C/aC++ compiler?

Hi Steven,

i said " i don't know how to create text file with ascii encoding" not i can't create a text file.
and please steven do not chatter excess
If you learn something take about otherwise silent.

thanks
Dennis Handly
Acclaimed Contributor

Re: How to compile something file by HP C/aC++ compiler?

>I said "i don't know how to create text file with ascii encoding" not i can't create a text file.

Let's just make it simple, create a standard Unix text file. (All text files are ascii by default.)
Srimalik
Valued Contributor

Re: How to compile something file by HP C/aC++ compiler?

In what form do you have the codeword?
1. written in a file on you filesystem
2. In an email
3. written on a piece of paper.

If 1. then just use this command to copy the code word.
cp /opt/aCC/newconfig/aCC.cwd

If 2 or 3. then
use this command
echo "your codeword here" > /opt/aCC/newconfig/aCC.cwd

-Sri
You need to be root for the above to work.





abandon all hope, ye who enter here..
Mousa55
Super Advisor

Re: How to compile something file by HP C/aC++ compiler?

Hi Srikrishan Malik,

the form of codeword i have it is number 2.
and i am tried to execute this command before that, but this message is appeared.
echo 9651*** > /opt/aCC/newconfig/aCC.cwd
/usr/bin/ksh: /opt/aCC/newconfig/aCC.cwd: cannot create
may be because the aCC.cwd is a directly.

thanks
Dennis Handly
Acclaimed Contributor

Re: How to compile something file by HP C/aC++ compiler?

>echo 9651*** > /opt/aCC/newconfig/aCC.cwd
/usr/bin/ksh: /opt/aCC/newconfig/aCC.cwd: cannot create

Are you root?

>may be because the aCC.cwd is a directly.

Directory? Why? Remove it.
Mousa55
Super Advisor

Re: How to compile something file by HP C/aC++ compiler?

Hi,

yes i am remove it and now the c++ is activated

very thanks
Mousa55
Super Advisor

Re: How to compile something file by HP C/aC++ compiler?

thanks for all