- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ANSI/C and C++
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
Discussions
Forums
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
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
тАО08-26-2002 03:05 AM
тАО08-26-2002 03:05 AM
I need to port some programs from Solaris to HP-UX. The langusges is ANSI/C and C++. Do I need to buy both a ANSI/C and a C++ compiler or can the C++ be used for ANSI/C too.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-26-2002 03:19 AM
тАО08-26-2002 03:19 AM
SolutionAlso look at http://gcc.gnu.org/ for precise info: Currently GCC contains front ends for C, C++, Objective C, Fortran, Java, and Ada, as well as libraries for these languages (libstdc++, libgcj,...).
Succes,
Ceesjan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-26-2002 04:13 AM
тАО08-26-2002 04:13 AM
Re: ANSI/C and C++
All C programs must compile under C++ compiler,but due to some unforseen errors some C progrmas wouldn't compile. So u need to buy both aC and aC++ compilers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-26-2002 04:40 AM
тАО08-26-2002 04:40 AM
Re: ANSI/C and C++
...and since some dev-kits enforce the use of HP's own compilers (and not permit GCC/G++ any more), you'll have to use (and buy) both...
FWIW,
Wodisch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-26-2002 04:52 AM
тАО08-26-2002 04:52 AM
Re: ANSI/C and C++
Fetch it from my ITRC site (CeesJan already mentioned it) https:/www.beepz.com/personal/merijn and *READ* the instructions for gcc
Just try it. If all goes well, you don't need to buy any compiler. GNU gcc is very ANSI compliant.
Recent gcc development also made huge improvements for HP's pa-risc architecture, taking away (more or less) the argument that HP-C compiled binaries are much faster than gcc compiled binaries.
Again, just try. It can't harm you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-27-2002 12:27 AM
тАО08-27-2002 12:27 AM
Re: ANSI/C and C++
The HP-UX C++ compiler can compile C files, too, as has been said before.
However, if you have dependecies on third party libraries or open source stuff, some of them must be compiled with a special compiler, mostly gcc, some with the HP-UX ANSI-C compiler.
So I'd check the dependencies first. E.g. we had to buy the ANSI-C compiler to compile Python and some other open source globalization library.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-27-2002 04:47 AM
тАО08-27-2002 04:47 AM
Re: ANSI/C and C++
For more information, see Bjarne Stroustroup's papers on C/C++ compatibility at http://www.research.att.com/~bs/papers.html . (Stroustroup is the father of C++.)
In practice, it's not too bad. A vast majority of the code should compile, and it's not too hard to fix the rest, assuming you've been diligent about using function prototypes, etc.
Jack
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-27-2002 05:57 AM
тАО08-27-2002 05:57 AM
Re: ANSI/C and C++
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-27-2002 10:04 PM
тАО08-27-2002 10:04 PM
Re: ANSI/C and C++
Some of this programs (loaded from the HPUX porting Archiv) come preconfigured for aCC. And it needs some (not too much) work to make them compile with gcc (e.g. using the right options).
About your ANSI/C, C++ problem:
Most compilers (like gcc) come in a way that they have front-ends which call the right compiler, depending on file-suffixes (c++ compiler for .cc files, c compiler for .c files).
So if you have gcc installed you can compile your c++ code with the c++ compiler, the ansi/c code with the c compiler.
And (if you think it makes sense, and you don't expect problems with name-mangling) you can compile your ansi/c code with the c++ compiler.
Hartmut