pigeon7778
asked on
regarding compiling
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)
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)
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.
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.
> 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).
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).
ASKER
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?
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?
ASKER
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?
if i give
cc t1.c
incorrect message catalog is coming
CC t1.c works.
What is the differece between cc and CC?
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
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
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.
ASKER
efn,checked CC there is no option for finding the version.is there any way to find out
Sorry, I don't know.
ASKER
thanks a lot for the information
I suspect that aCC is a link to /usr/lbin/ctcom, which doesn't exist.
Kent