views:

76

answers:

2

Today I've encountered a very good book : UNIX to Linux® Porting: A Comprehensive Reference By Alfredo Mendoza, Chakarat Skawratananond, Artis Walker

This reminded me of the thing I always wanted to know. "Porting Linux apps to Windows". I mean porting native Linux apps to native Windows with no platforms involved.

If I can find any good book which explains this topic. I've lot of amazing linux command line tools in mind which needs a windows port.

Please point me to relevant articles/tutorials/books.

PS: please don't tell me to use linux emulation platforms like Cygwin.

+1  A: 

Well, MinGW is possibly an API you're looking for, if you don't want to use emulation platforms. It provides compatibility between Unix and Win32 apps, and implements some of the win32 API. I'm using it myself for compiling the ns-3 simulator which is designed to run on *nix systems and Cygwin. You still need precompiler statements in there to access certain Win32 features where needed, or to modify macro / function names for cross-compatability. For instance, Sleep(..) exists but sleep(..) doesn't. There is also no usleep(..). I think this API just makes life easier for the application porter without any downsides.

Chris Dennett
+1  A: 

MSYS & MinGW are two things that are required for porting apps from Linux to Windows.

Alternative way is to use Cygwin. But I don't consider it as 100% porting because it adds dependencies of Cygwin.

claws