Solved

Running C++ Program in Unix/Linux/Solaris

Posted on 2004-09-19
4
234 Views
Last Modified: 2013-12-05
I am trying to compile a program in Borland C++. Can I run the file in Unix/Linux/Solaris.
I want to know if I can use it in any OS

Thanks in advance
0
Comment
Question by:surcha
4 Comments
 
LVL 3

Accepted Solution

by:
KeithWatson earned 63 total points
ID: 12095818
Your program may or may not be easily portable to other operating systems depending on its content. You will need to re-compile the program for the target operating system using an appropriate compiler, such as GCC.

If your program is a vanilla C++ program using no OS-specific libraries then it ought to compile fairly easily; however, if you use libraries such as the Win32 API, then these calls will not (without additional software/effort) compile easily to a Unix platform.

Borland Kylix provides a solution that allows programs to be cross-compiled for Linux and Windows. I can see no mention of Solaris or other Unix platforms.

Hope that's of use.
0
 
LVL 19

Assisted Solution

by:mrwad99
mrwad99 earned 62 total points
ID: 12096089
Essentially KeithWatson is correct in all senses.

Just a little elaboration; if borland only generates EXE files then you need to recompile on the target platform.  An EXE for Windows cannot be run on UNIX or other.

>> then these calls will not (without additional software/effort) compile easily to a Unix platform.

Yup.  Like WSock32 (Winsock), or all the threading architecture (i.e. pthreads on UNIX, usually HANDLES on Windows).
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A short article about problems I had with the new location API and permissions in Marshmallow
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question