The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Porting DHCP from Linux to VxWorks Sunny Shivam IP Networking 2 05-01-2008 09:44 PM
when porting from HP-UX to Linux amitpansuria Linux 1 04-17-2008 11:08 PM
Porting linux ftpd code to Aix srksn UNIX for Advanced & Expert Users 2 08-17-2007 01:54 AM
HP-UX to linux porting arunprakash UNIX for Dummies Questions & Answers 0 02-21-2005 01:49 AM
Porting Win32 application into Linux Sergeyy High Level Programming 0 06-23-2003 04:15 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-31-2007
Registered User
 

Join Date: Oct 2007
Posts: 4
Stumble this Post!
Porting From Linux To Hpux

Gents,

i'm a senior applications developer and need to port a Linux server application ( no additional / special libraries or unique header files ) to a HPUX enviroment.

Any chance to compile it on the Linux using flags to create an HPUX binary with gcc?

Last edited by anak0nda; 10-31-2007 at 12:21 PM. Reason: wrong
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 10-31-2007
Registered User
 

Join Date: Jan 2007
Posts: 2,965
Stumble this Post!
Quote:
Originally Posted by anak0nda View Post
Any chance to compile it on the Linux using flags to create an HPUX binary with gcc?
Not trivially.

What version of HPUX?

I use both gcc and HPUX's cc/aCC compilers on Itanium2, PA-RISC 1.1 and PA-RISC 2.0 running HP-UX 11.11 in both 32bit and 64bit mode and they both do the job well.

Do you need help with the compiler options?
Reply With Quote
  #3 (permalink)  
Old 10-31-2007
Registered User
 

Join Date: Oct 2007
Posts: 4
Stumble this Post!
This is a:

UP_UX B.11.0 U 9000/800 system,
it is really trivial application but as usualy do not run on HPUX box.

I've tried to do the 'cc' but it fails with plenty of errors...
Reply With Quote
  #4 (permalink)  
Old 10-31-2007
Registered User
 

Join Date: Jan 2007
Posts: 2,965
Stumble this Post!
Quote:
Originally Posted by anak0nda View Post
I've tried to do the 'cc' but it fails with plenty of errors...
(a) What kind of errors?

(b) does it assume certain include files?

(c) is it using "gcc" pragmas?

(d) does it compile on Linux with "-Wall -Werror", if not, fix those firsts.
Reply With Quote
  #5 (permalink)  
Old 10-31-2007
Registered User
 

Join Date: Oct 2007
Posts: 4
Stumble this Post!
well..
linux compiles it well with -Wall -Werror

HPUX drops for example:

error 1002: unexpected character "//comment here"
Reply With Quote
  #6 (permalink)  
Old 10-31-2007
Registered User
 

Join Date: Jan 2007
Posts: 2,965
Stumble this Post!
Quote:
Originally Posted by anak0nda View Post
error 1002: unexpected character "//comment here"
Not suprising, that's a C++ comment in a C source file.

I suggest you strip the C++ comments out of the source.

Just because gcc/g++ accepts it, does not make it ANSI C.
Reply With Quote
  #7 (permalink)  
Old 10-31-2007
Registered User
 

Join Date: Oct 2007
Posts: 4
Stumble this Post!
Ok i'll work on the code to make it 'clear' and come back to you with the latest results.. thanks porter!
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
linux

Thread Tools
Display Modes




All times are GMT -7. The time now is 02:07 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0