Making a program compiled on Unix (HPUX) work on Linux


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Making a program compiled on Unix (HPUX) work on Linux
# 1  
Old 12-02-2010
Making a program compiled on Unix (HPUX) work on Linux

I am trying to make an application which works on unix to work on linux. I already tried copying the binary files and start it up but I am getting an error stating "Cannot execute binary file". Then I tried to recompile but i am getting an error whenever I tried to recompile. I am getting the following errors:

cc: +w1: No such file or directory
cc: +z: No such file or directory
cc: +DAportable: No such file or directory
cc: ": No such file or directory
<command line>:1:2: missing '(' after predicate
make: *** [xxxxxxxxxx.o] Error 1


I am using a make file for compiling.
I have a feeling that i need to rework on the makefile for it to work on linux.
I need some ideas on how to get this work.
Is there anyone who have an experience porting applications from unix to linux?
# 2  
Old 12-02-2010
HPUX uses a very weird, old compiler which rejects a lot of modern syntax. It might even still be K&R.

We can't see your makefile from here. The contents of the code are probably important too.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Run program compiled in Ubuntu in centos

Will a program compiled in ubuntu 14.04 execute in Centos 7? That is to say a tarball or zip is downloaded from github and extracted, compiled, and make is all done in ubuntu 14.04, can I mv the program from ubuntu 14.04 to Centos 7, add it to path in Centos 7. And run it? Thank you :) (3 Replies)
Discussion started by: cmccabe
3 Replies

2. Programming

Using ANSI color codes in gcc compiled program

I have put some yellow color codes and works well. I call the funstion using print_usage(stderr, 0); I would like to know if there is any way, to store the ansi color codes in variables and then call them inside fprintf. Or have a format followed by the strings I want to output. ... (5 Replies)
Discussion started by: kristinu
5 Replies

3. Shell Programming and Scripting

sed works on Linux and Unix does not work

Hi, I use this command in Linux but if I run the same command does not work in freebsd. Follow the below command: Linux works: sed -e '1731a\' -e '####' squid.conf > squid2.conf ; sed -e '1731a\' -e 'acl TESTE_ip src 192.168.1.1/255.255.255.255' squid2.conf > squid.conf ; sed -e... (7 Replies)
Discussion started by: andreirp
7 Replies

4. Solaris

Issue in pro*C program compiled in solaris 10

Hi, We upgraded our servers from solaris 9 to 10. We recompiled all the Pro*C programs with the new oracle version as well. Oracle is 11g. We are facing core dump with the below error for certain executions. But when we are placing new statements between the error fucntion we get junk values to... (1 Reply)
Discussion started by: saroopkris85
1 Replies

5. Homework & Coursework Questions

Calling compiled C program with Perl program

Long story short: I'm working inside of a Unix SSH under a bash shell. I have to code a C program that generates a random number. Then I have to call the compiled C program with a Perl program to run the C program 20 times and put all the generated random #s into a text file, then print that text... (1 Reply)
Discussion started by: jdkirby
1 Replies

6. HP-UX

wcsftime() on HPUX doesn't work

Hi, I'm wrote a small program on HPUX that uses wcsftime, but this function seems to be not working - I get 0 as a result, the output buffer returns empty, and errno is 0 : #include <iostream> using namespace std; int main () { size_t formattedTimeLength = 0; wchar_t formattedTime... (9 Replies)
Discussion started by: itaiy
9 Replies

7. Shell Programming and Scripting

Problem with `cat` the compiled output of C program in unix

Hello All, I have coded a C program which looks something like below... (program name: test.c) #include<stdio.h> main() { int dist,dm,dcm; printf(" Enter the distance between 2 cities in KM : "); scanf("%d",&dist); dm=dist*1000; dcm=dist*10; printf("Distance between 2 cities in... (6 Replies)
Discussion started by: smarty86
6 Replies

8. UNIX for Dummies Questions & Answers

Any Linux/Unix work with SATA yet?

i got my computer in 2k, built it myself. top of the line then and better than most still now. one problem however is i was never able to install unix because the old kernels were not compatible with SATA hard drives i dont have any IDE drives nor do i want any I want mine on SATA, but every... (5 Replies)
Discussion started by: GXDeMoNN
5 Replies

9. Programming

How to use a .exe with a compiled program.

I am confused about how to use a .exe file in unix along with a compiled C++ program. I've been using emacs and I compiled with g++, but I have no idea how that relates to use with a .exe. (1 Reply)
Discussion started by: adamsy
1 Replies

10. Programming

Running a compiled Program

Just getting into the Unix command line programming and am unable to run any program I write. I am using a Makefile and the source is compiling but when I enter the name of the output file I get back: bash: lab01exe.out: command not found I'm sure I am just dooing something simple... (2 Replies)
Discussion started by: Krebsbac
2 Replies
Login or Register to Ask a Question