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-02-2008 01:44 AM
when porting from HP-UX to Linux amitpansuria Linux 1 04-18-2008 03:08 AM
Porting linux ftpd code to Aix srksn UNIX for Advanced & Expert Users 2 08-17-2007 05:54 AM
HP-UX to linux porting arunprakash UNIX for Dummies Questions & Answers 0 02-21-2005 05:49 AM
Porting Win32 application into Linux Sergeyy High Level Programming 0 06-23-2003 08:15 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-31-2007
anak0nda anak0nda is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 4
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 04:21 PM.. Reason: wrong
  #2 (permalink)  
Old 10-31-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
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?
  #3 (permalink)  
Old 10-31-2007
anak0nda anak0nda is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 4
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...
  #4 (permalink)  
Old 10-31-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
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.
  #5 (permalink)  
Old 10-31-2007
anak0nda anak0nda is offline
Registered User
  
 

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

HPUX drops for example:

error 1002: unexpected character "//comment here"
  #6 (permalink)  
Old 10-31-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
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.
Closed Thread

Bookmarks

Tags
linux

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:05 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0