LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-09-2003, 08:02 PM   #1
garbo73
Member
 
Registered: Sep 2003
Posts: 59

Rep: Reputation: 15
Porting Programs


I would like to know what it takes to port programs, for example what is required to make a Windows program run as a Linux native program. Not looking for exact details or emulators, just the steps and info needed. Thanks for any advise offered.
 
Old 10-10-2003, 06:21 AM   #2
lehrig
LQ Newbie
 
Registered: Oct 2003
Posts: 8

Rep: Reputation: 0
It depends on the GUI library the windows program is using.
This may be total different / unavailable on linux.
e.G.
MFC -> nearly impossible
Qt -> no problem
 
Old 10-10-2003, 06:29 AM   #3
kev82
Senior Member
 
Registered: Apr 2003
Location: Lancaster, England
Distribution: Debian Etch, OS X 10.4
Posts: 1,263

Rep: Reputation: 51
no, it doesnt really matter what api has been used the most important thing is if the windows program provides an abstraction from the win-specific calls, if so then you simply have to write the same interface with *nix system calls(not too hard), however if the windows program has all the windows-specific calls mixed in with everything else then trying to port it would be a total nightmare.
 
Old 10-10-2003, 07:05 AM   #4
lehrig
LQ Newbie
 
Registered: Oct 2003
Posts: 8

Rep: Reputation: 0
> however if the windows program has all the windows-specific calls mixed in with everything else then trying to port it would be a total nightmare.

But that's what nearly all windows progs are like.
 
Old 10-10-2003, 07:32 AM   #5
dakensta
Member
 
Registered: Jun 2003
Location: SEUK
Distribution: Debian & OS X
Posts: 194

Rep: Reputation: 35
I would see if wine supports your needs for running a program.

If rebuilding from source is the issue then look at winelib (part of the wine project):

http://www.winehq.org/site/winelib


Introduction

1.1. What is Winelib

Winelib is a development toolkit which allows you to compile your Windows applications on Unix.

 
Old 10-10-2003, 10:26 AM   #6
kev82
Senior Member
 
Registered: Apr 2003
Location: Lancaster, England
Distribution: Debian Etch, OS X 10.4
Posts: 1,263

Rep: Reputation: 51
by lehrig
But that's what nearly all windows progs are like.

well i cant say ive seen the source of many windows programs but i always provide a decent abstraction between the operating system and my code, for example i have a physics particle simulator written in c++ and opengl, all the platform specific stuff is hidden behind classes and it took me less than a day to port it from linux to windows.

if most windows programs are like that then its the fault of the programmer not windows.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Porting question kwt0 Linux - Software 1 05-25-2005 12:50 PM
Help Porting C Programs, Utilities, etc.. from HP-UX rmhaddad Linux - Software 2 01-19-2004 03:23 PM
Porting programs to Linux scm86 Programming 13 01-18-2004 10:03 AM
cygwin porting Vader Linux - Software 1 01-01-2004 07:02 AM
porting programs to linux, io.h, window.h StressedLemming Linux - Newbie 1 11-30-2003 08:33 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration