473,413 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

c program porting from Windows to UNIX

I worked on c/c++ executable file building on Windows platform before. Now, there is a need to port my c/c++ program from Windows to UNIX platform, and I have no experience in this at all. Anybody have step by step guidance on the porting work? First thing that I faced is, it has #include <windows.h> on Windows, what is the equivalent in Unix? Thanks a lot.
Sep 7 '07 #1
5 2599
sicarie
4,677 Expert Mod 4TB
Are you using the Win32 API? If so, you'll have to find the equivalent functions in Unix. I would start by Google searching the flavor of Unix you are using and "API".
Sep 7 '07 #2
weaknessforcats
9,208 Expert Mod 8TB
If this is a graphical program, there is no Unix equivalent. You will need to recode the entire application uisng a Unix supported environment, like Motif.
Sep 7 '07 #3
I think there is a fundamental difference between windows style programming starting with WinMain and UNIX style programs.

I think you can have most of the code that has algorithm etc.

but you will have to do a lot of re-structuring.
Sep 7 '07 #4
RRick
463 Expert 256MB
One of the first places to start is to figure out how to build the project. Windows uses VC++(workspaces and projects) and unix uses makefiles.

Before jumping into the quagmire of makefiles, I would look for an unix based IDE program that can read/convert the windows workspace and project files for the unix platform.

I have heard of Eclipse for C++, but have never used it. If you find one, let us know.
Sep 7 '07 #5
weaknessforcats
9,208 Expert Mod 8TB
There is a solution here and one that could maake you a lot of money.

That is, write a CLR for C# that runs on Unix/Linux. All you need to is process the MSIL code that is the result of the C# and other .NET compilers. MSIL format is public domain so you don't need a license.

When this works ALL Windows .NET code will run on Unix/Linux.
Sep 8 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: eichin | last post by:
One of my recent projects has involved taking an accretion of sh and perl scripts and "doing them right" - making them modular, improving the error reporting, making it easier to add even more...
1
by: Will Stuyvesant | last post by:
I never used the popen or popen2 libraries but it is my understanding that they can capture the output of console based programs. Is it also possible to send keystrokes to console base programs? ...
6
by: Kyle | last post by:
Hello all! I'm looking into developing a biological program for modeling and sequencing DNA and other biological processes. The program's main focus would be to look for similarities and...
50
by: strutsng | last post by:
I want if "a C program is a standard C++ program, but not vice versa" is a correct statement? In a C++ program, we can use standard C libraries. However, we cannot use C++ libraries inside C...
34
by: subramanian100in | last post by:
Is there any difference between porting and migrating. Kindly explain
7
by: Lior | last post by:
Hi, I have small code, that compiles on Visual C++ into a shared library (DLL). I need to compile it under linux, but the code includes some data types I'm not familiar with, such as DWORD,...
7
by: zman77 | last post by:
Hi. I have a project (multiple header and source files) that was written in C, in unix. I made a new C++ project in MSVS 2005 (blank project), and am trying to simply copy the C code to my new C++...
5
by: nleschov | last post by:
Hello, I'm working on a project that involves embedded controllers communicating over modbus. I would like to use a well-written modbus library to add modbus functionality to my project and I...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.