LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 03-24-2009, 05:08 AM   #1
ranish
LQ Newbie
 
Registered: Mar 2009
Posts: 1

Rep: Reputation: 0
Porting Linux to windows.


Hi.. all...

i am new to this forum...

i have one simple query...
which is the easiest way to port a linux program in cpp to windows.
its console based program.. which is using pthreads and all..

Need to re-write those parts completely or better to use cross compilers like Qt or wxWidgets???

whis is the easiest???


Please reply...
 
Old 03-24-2009, 05:32 AM   #2
reptiler
Member
 
Registered: Mar 2009
Location: Hong Kong
Distribution: Fedora
Posts: 184

Rep: Reputation: 42
Just as a note: QT or wxWidgets are not cross-compilers, they are libraries which are available on both platforms.
As you are saying that it's a command-line-application those libraries will not be much use to you as they are used to create GUIs.
 
Old 03-24-2009, 06:48 AM   #3
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
Never tried it myself, but this may do it for you:
http://www.mingw.org/

(Ubuntu/Debian package: "mingw32")
 
Old 03-24-2009, 07:48 AM   #4
Biddle
Member
 
Registered: Jan 2009
Posts: 37

Rep: Reputation: 17
Threads are an issue which can be handled in a couple of ways.
Reinvent the wheel by creating platform specific adapter classes.
Use boost.
Use win32-pthreads.
As you do not really mention anything besides threads and gui, which you already know the cross platform libraries, there is little else I can suggest besides trying to use cygwin (or alternatives) to compile on windows.
 
Old 03-24-2009, 12:27 PM   #5
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
Short answer: research. As in, study the source-code carefully, identify what it requires and how it now interfaces with the operating-system. Then, start mapping those requirements one by one to other targets.
 
  


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
linux to windows porting Atrocity Linux - Software 5 02-19-2013 08:36 AM
Windows to Linux porting sridhar_dct3 Linux - Software 3 12-11-2008 11:48 PM
Porting of a Windows App to Linux gnraghu Programming 1 09-09-2006 10:10 AM
Porting of a Windows App to Linux gnraghu Programming 1 09-08-2006 02:57 AM
porting files from Linux to Windows? Hosiah Linux - General 2 02-23-2006 05:11 PM

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

All times are GMT -5. The time now is 11:20 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