- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- CC compiler for HPux11
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
Forums
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
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
05-08-2001 11:41 AM
05-08-2001 11:41 AM
I need a CC compiler for HPUX11. I have aCC but it is not helpful when there is need of soem preprocessing or translation has to be done.MOre clearly, I am porting a part of application of hp10.2 to hp11. Can anybody suggest how can I get CC on HPUX11.
Thanks
Prashun
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2001 11:45 AM
05-08-2001 11:45 AM
Re: CC compiler for HPux11
Get gcc from your archive porting center
or you will have to buy HP's ansi c...
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2001 11:48 AM
05-08-2001 11:48 AM
Re: CC compiler for HPux11
http://hpux.cs.utah.edu/hppd/hpux/Gnu/gcc-2.95.3/
Good luck
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2001 11:49 AM
05-08-2001 11:49 AM
Re: CC compiler for HPux11
I don't think I understand. You can invoke aCC with -P to preprocess. If you like, you can look at B3901BA (HP C/ANSI C Compiler).
I actually have both and have never had a situation that one would compile and the other would not - if we are talking about C and not C++. If you could tell us more about your problem, perhaps we could help.
Regards, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2001 06:03 AM
05-10-2001 06:03 AM
Re: CC compiler for HPux11
gcc can not be used for my application as GCC does not seem to support preprocessor translation as it is not part of the ANSI standard.
Now ansi c available with HPUX11 doesn't have compiler of C++. -P option with aCC is not working
The only alternate is to get CC compiler for HPUX11. Can anybody suggest me how to get it.
Regards
Prashun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2001 06:16 AM
05-10-2001 06:16 AM
Re: CC compiler for HPux11
Again, I don't understand, I just did an aCC -P
myfile.c with some preprocessor directives (#define,#ifdef,etc.) and got an output file myfile.i that looked just as I expected. I did this on both an 11.0 box and an 11i and it worked fine. Can you give us some idea of what you are trying to do? As for as getting the HP ANSI C Compiler B3901BA, I would contact my HP representative and explain the problems you are having with aCC and ask for a trial copy.
Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2001 10:01 AM
05-10-2001 10:01 AM
Re: CC compiler for HPux11
Using aCC with -P option, it generates a file with a suffix .i what is the utility of this file, because it still conatians the unresolved text
Prashun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2001 10:15 AM
05-10-2001 10:15 AM
Re: CC compiler for HPux11
Example (as simple as possible):
#define XXX "Hello, world!"
myfile.c
int main()
{
printf("%s\n",XXX);
return(0);
}
after aCC -P -> myfile.i
int main()
{
printf("%s\n","Hello, world!");
return(0);
}
This is exactly what a preprocessor is supposed to do. If you can give an equally simple example of the problem, I think that would help.
By the way, if I invoke aCC myfile.c the preprocessor is automatically invoked and the XXX macro is expanded to "Hello, world!".
I'm confiused, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2001 10:25 AM
05-10-2001 10:25 AM
Re: CC compiler for HPux11
I am sorry that I couldn't convey the details.
DO we have to copy the intermediate file again before putting it infront of the compiler.
If i have a temp.i when I run aCC -P temp.C. Then I am using the makefile, how this .i file is picked automatically.
Moreover I have long code details which Ihave to give you but more or less there is something like
PT_names
SOme functions
..
...
..
PT_end
when I was running without the -P option this was giving the problem as PT_names is not defined. When I used -P option the error goes but the .i files it created still contains PT_names and PT_end. Now when I am using the option from the makefile how we will be able to use this .i file. Can you please elaborate a little bit more.
Regards
Prashun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2001 10:27 AM
05-10-2001 10:27 AM
Re: CC compiler for HPux11
HOw will I get the object file
Prashun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2001 11:13 AM
05-10-2001 11:13 AM
SolutionI got bad news, ANSI C isn't going to help you either. Those PT_names ... PT_end are not c or cpp statements. Any definitions for the preprocessor must begin with '#'. Also, aCC does not include a translator like cfront (it was considered unnecessary). Without seeing your makefile and their includes I can only guess but here goes. I think your original port had a makefile rule that said call some translator program then invoke the c compiler.
Not the good news is that this translator which appears to define functions shouldn't be too difficult to create.
I think you indicated that the application runs on 10.20; if you can find the mystery translator program it should run on the 11.x box. One other method that I can think of is get the final processed .c files off the 10.20 box and compile them.
Hope some of this helps you, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2001 11:48 AM
05-10-2001 11:48 AM
Re: CC compiler for HPux11
Thanks for your valauable advice, Can you just put some focus on last paragraph.
Thanks
Prashun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2001 11:55 AM
05-10-2001 11:55 AM
Re: CC compiler for HPux11
I probably can but I would need to see some of your makefiles and a little bit of your code with the PT.. stuff. You can attach them. But before I do that I'm going to ask you a really dumg question - Have you tried to run your existing 10.20 binaries on 11.0? Usually they work just fine although you might have to set some SHLIB_PATH stuff.
Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2001 12:16 PM
05-10-2001 12:16 PM
Re: CC compiler for HPux11
I am attaching a header file. which has this stuff PT_names PT_define. Now you are right that we had a translator to take care of that on HP10.2 as it was using a cfront compiler now aCC has removed that, how can we take care of this stuff. DO you mean by your last one that we have to translate the code on 10.2 and then bring it to HP11 and then try to compile. As there is lot of stuff like that I don't know how much effort is needed in that.
You are also saying of some translator program, can pur some focus on this one
Bye
prashun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2001 02:13 PM
05-10-2001 02:13 PM
Re: CC compiler for HPux11
This is not C; it's C++. You must have another
header file that is included before this header file. It's what defines PT_xxx.
You may have an include path problem in your makefile.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2001 06:55 AM
05-11-2001 06:55 AM
Re: CC compiler for HPux11
I looked at you C++ header file and I now see why you thought ANSI/C was the answer. In this case those "ANSI C Preprocessor" comments are simply the header file's way of determining which compiler version you are running. I think at this point if you are not comfortable in a UNIX C++ environment, I would attempt to find someone. I would still try my earlier suggestion and see if you can restore the old 10.20 binaries from backup and see if they will run on your 11.0 box (most will). That way you wouldn't need to port anything unless you are also required to do maintenance on the code.
Good luck, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2001 07:04 AM
05-11-2001 07:04 AM
Re: CC compiler for HPux11
Thanks for your replies. I am of the thinking that if some how I can get a CC compiler same as on 10.2 for HP11 and then try to compile probably these things will go.
If you can emphasise on how to get that, till the time we are doing preprocessing on HP10.2 and bringing those files here and then compiling on HP11
thanks
Prashun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2001 07:59 AM
05-11-2001 07:59 AM
Re: CC compiler for HPux11
I'll try to give one more hint. I really believe the key to this problem is not swapping the compiler but getting the makefiles just right. In many cases (and especially on complex systems) the makes have to be run in a certain order. Generally, header and include files are built (after setting some platform, OS, and compiler dependent options), then libraries are built, and finally the executables are compiled and linked. Most often, there is a master makefile that calls all the other makefiles to ensure that every thing in done in the proper sequence. My best guess is that the 10.20 version was compiled under the older cfront system which translated the c++ source to c source and then cc compiled that. If you can get all the makefile options right, I think you can make this work.
Clay