- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Compiling C++ codes using HP C compiler
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2014 03:35 AM
06-25-2014 03:35 AM
Hi,
Can I know whether I can compile C++ codes using HP C compiler /opt/aCC/bin/cc. If so could you let me know the options need to use along with cc.
OS info:
Release: HP-UX B.11.31
Machine: ia64
# swlist -l product |grep -i compiler
ACXX C.06.20 HP C/aC++ Compiler
C-ANSI-C C.06.20 HP C/aC++ Compiler
COMPLIBS B.11.31 Compiler Support Libraries
PHCO_42454 1.0 Linker/Compiler/Unwind ENG Manpage Patch
PHCO_42463 1.0 linker/compiler/unwind Japanese manpage patch
PHSS_38155 1.0 bundled PA C compiler on IPF
PHSS_40631 1.0 HP C/aC++ Compiler (A.06.24)
Sample Program.
[user12->xxxx]/home/user12/cbs/tmp>more getting_started.cpp
#include <iostream.h>
int main()
{
int x,y;
cout << "Enter an integer: ";
cin >> x;
y = x * 2;
cout << "\n" << y <<" is twice " << x <<".\n";
}
Using cc it is not working
[user12->xxxx]/home/user12/cbs/tmp>cc getting_started.cpp
ld: Mismatched ABI (not an ELF file) for getting_started.cpp
Fatal error.
[user12->xxxx]/home/user12/cbs/tmp>
Using aCC it is working
[user12->xxxx]/home/user12/cbs/tmp>aCC getting_started.cpp
[user12->xxxx]/home/user12/cbs/tmp>echo $?
0
[user12->xxxx]/home/user12/cbs/tmp>ls -l a.out
-rwx------ 1 user12 tuxedo 175608 Jun 25 12:58 a.out
[user12->xxxx]/home/user12/cbs/tmp>
Sincere Regards,
Aneesh
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2014 04:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2014 05:30 AM
06-25-2014 05:30 AM
Re: Compiling C++ codes using HP C compiler
Hi Soumitra,
Thank you for your response ,
the below is the comping statement and output shared to me by developer , regarding "BS-2978.c not found" error message when I checked with him he said that can be ignored . He is claiming that this was working when he last compiled almost a year back in same box :(
compiling option
-----------------
cc +DD64 +Olit=all -Wl,+s -D__BIGMSGQUEUE_ENABLED -mt I$TUXDIR/include -o fcreditSrv BS-2978.c -L${TUXDIR}/lib fcreditSrv.o ccEnqCid.o ccRoutine.o xmlWrapper.cpp DOMTreeErrorReporter.cpp -ltxml /opt/mqm/lib/libmqm_r.so -ltux -lbuft -lfml -lfml32 -lengine -lpthread -lcl -lnsl /u01/app/oracle/product/10.2.0.3/lib32/libclntsh.so
compiling error messahe
------
cc: error 1913: `BS-d21.c' does not exist or cannot be read
ccEnqCid.c:
cc: error 1913: `BS-d21.c' does not exist or cannot be read
ccRoutine.c:
cc: error 1913: `BS-d21.c' does not exist or cannot be read
fcreditSrv.c:
BS-2978.c:
ld: Mismatched ABI (not an ELF file) for xmlWrapper.cpp
Fatal error.
CMDTUX_CAT:1832: ERROR: can't execute cc +DD32 +Olit=all -Wl,+s -D__BIGMSGQUEUE_ENABLED -mt -I$TUXDIR/include -o fcreditSrv BS-2978.c -L${TUXDIR}/lib fcreditSrv.o ccEnqCid.o ccRoutine.o xmlWrapper.cpp DOMTreeErrorReporter.cpp -ltxml /opt/mqm/lib/libmqm_r.so -ltux -lbuft -lfml -lfml32 -lengine -lpthread -lcl -lnsl /u01/app/oracle/product/10.2.0.3/lib32/libclntsh.so
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2014 03:13 AM
06-26-2014 03:13 AM
Re: Compiling C++ codes using HP C compiler
>He is claiming that this was working when he last compiled almost a year back in same box
Not hardly.
The cc driver doesn't know what to do with xmlWrapper.cpp and passes it directly to ld. ld gives that ABI error.
Also, why do you have +DD64 but have libs like:
-lfml32 ... /u01/app/oracle/product/10.2.0.3/lib32/libclntsh.so