Porting Windows -> Linux (tools/libraries)

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Fri Mar 14 15:27:17 UTC 2008


On Thu, Mar 13, 2008 at 12:21:42PM -0400, Paul Nash wrote:
> I have recently done a couple of large porting jobs from Windows to  
> Linux, and as part of the process have built up partial libraries to  
> emulate bits of the win32 API on Linux, such as the crypto API, MSSQL  
> (using MySQL instead), MS-XML (libxml2) and winsock (yetch).  These  
> libraries currently contain enough code (functions emulated, options  
> supported) to support these specific projects (between 20% and 80% of  
> the MS functionality).
> 
> I am considering completing them as a general-purpose tool for others  
> to use (for money :-)), but don't want to waste my time if there is no  
> interest.  So, if anyone here would have a use for such libraries, or  
> can think of anyone who might, or knows of other forums to ask, please  
> let me know.

Commercial companies have already done such things in the past.  Just
look at IE for Solaris and the like.  That's how they were done.

The idea overall is absolutely horrid and not the way to make quality
software.

Replace the UI with SDL or similar which is a cross platform library,
and avoid using microsoft's proprietary API directly in the first place.
SDL is also much easier to use than microsoft's native API so you get to
have a nice interface that hides some of the stupidness from you, and
you get the bonus of software that will compile and run on Mac, Linux,
Windows, and most unix systems.

Hasn't the wine project already done more than you so far anyhow?
Couldn't you have used that?

Basically use SDL instead of DirectX or MFC and the like.
use ODBC if you want, it does work on linux as well, and seems to
support a whole lot of different databases quite well.
I believe SDL covers network stuff too, so forget winsock.
As for XML, well I am not sure why anyone uses that in the first place.

If you want your code to run on stuff that isn't windows ever at any
point in the future, then don't write it to the windows native API in
the first place.  It's just short sighted.

--
Len Sorensen
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list