?
Solved

regarding compiling

Posted on 2005-03-03
11
Medium Priority
?
329 Views
Last Modified: 2012-06-27
I am using HPUX 11.0
how to compile a  c/c++ program using aCC compiler. i am getting error.
If i use CC compiler i am not getting an error.What is the difference between CC and aCC.
what are all the compilers in UNIX.How to compile the C/C++ program in it.
Also is the data type is dependent on compiler or OS or processor?
if integer size is 2 or 4 will it be the same for all the compilers?


t2.C
*****
#include<iostream.h>
int main()
{
cout<<"hello world";
return 0;
}

CC t2.C
successful

aCC t2.C
aCC: internal error 1901: cannot exec /usr/lbin/ctcom: 2 (No such file or directory)
0
Comment
Question by:pigeon7778
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
11 Comments
 
LVL 46

Expert Comment

by:Kent Olsen
ID: 13450244

I suspect that aCC is a link to /usr/lbin/ctcom, which doesn't exist.

Kent
0
 
LVL 11

Expert Comment

by:avizit
ID: 13450347
from http://www.hp.com/workstations/segments/mcad/dassault/faqs/v4_faq.html

Where does the "cannot exec /usr/lbin/ctco" error come from?
A. When running the aCC compiler as catadm, the following error occurs:
aCC: internal error 1901: cannot exec /usr/lbin/ctcom: 2 (No such file or directory)

This pb is probably due to the setting of the PATH variable. To workaround of this, either invoke aCC by absolute path or move up /opt/aCC/bin in the definition of the PATH variable (export PATH=/opt/aCC/bin:$PATH). This is a known issue which has normally been fixed in the 1.27 aCC (and higher level). Do a what /usr/lib/libCsup.1 to get the level of aCC, but based on the certified Dassault Systemes compilers, you should run a 1.21 aCC.
0
 
LVL 15

Expert Comment

by:efn
ID: 13450714
> Also is the data type is dependent on compiler or OS or processor?

The physical representation of standard data types depends directly on the compiler.  The compiler implementer's decisions will be primarily determined by the processor.

>if integer size is 2 or 4 will it be the same for all the compilers?

No.  It is likely to be the same for all compilers for a class of processors, but this is not guaranteed.  The language specification only guarantees minimum sizes and some relative relationships among the types (for example, int must be at least as big as short).
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:pigeon7778
ID: 13457757
Thanks a lot for the information
Is CC compiler is present in all the UNIX versions? .Is aCC has more features compared to CC so two compilers are provided?.So if use aCC in my system i cant port the program to another UNIX vendor? so is it better to use CC than aCC?



0
 

Author Comment

by:pigeon7778
ID: 13466123
aCC is working for me.
if i give
cc t1.c
incorrect message catalog is coming
CC t1.c works.
What is the differece between cc and CC?

0
 
LVL 15

Accepted Solution

by:
efn earned 100 total points
ID: 13466389
cc is the C compiler.  CC is the C++ compiler.  You have a C++ program, so the C compiler doesn't understand it.

You can find answers to questions like this in the documentation:

http://docs.hp.com/en/dev.html
0
 

Author Comment

by:pigeon7778
ID: 13469464
efn,Thanks a lot for the Information.Also i want to know is there are any unix command to know the compiler its using and  version of the compiler
0
 
LVL 15

Expert Comment

by:efn
ID: 13471119
I don't think there is any standard command to find out what compilers are installed.  I believe "cc" is the traditional name for the C compiler.  If you can find a compiler, it will typically have a command-line option to tell you its version.  A compiler that comes with the operating system should be documented in the operating system documentation.  For a compiler that was installed separately, you may just have to know that it is there, unless you can recognize the file name.
0
 

Author Comment

by:pigeon7778
ID: 13494924
efn,checked CC there is no option for finding the version.is there any way to find out
0
 
LVL 15

Expert Comment

by:efn
ID: 13503489
Sorry, I don't know.
0
 

Author Comment

by:pigeon7778
ID: 13505141
thanks a lot for the information
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.
Suggested Courses
Course of the Month12 days, 5 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question