Re: linux to windows porting help
- From: Randy Howard <randyhoward@xxxxxxxxxxxxxxxxx>
- Date: Mon, 05 Jun 2006 18:12:04 GMT
Richard Heathfield wrote
(in article <1dOdnWBxcNBr1RnZRVnyuw@xxxxxx>):
vamsi said:
Hi guys,
I am working on a project that involves porting c programs from
linux environment to windows environment.
You're going the wrong way, surely? :-)
Any effort to move some decent software to the Windows platform
would have to be an improvement.
It would be great if anyone
could provide references on getting an overview on the pre-requisite
knowledege one should have to do a smooth porting.
You might be in luck. The program might have been written to conform to ISO
C. If so, all you have to do is move the code over and re-compile.
Alas, you are probably not in luck. If the program uses GTK+, you can at
least get a Win32 port of that.
Networking stuff won't be too hard to port if it's been done right. Replace
all the networking headers with <winsock.h>, add the relevant sockets
library (I forget the name, but comp.os.ms-windows.programmer.win32 will
know) to your project, replace socket-closing close() calls with
closesocket(), change socket objects from int type to SOCKET type, add a
WSAStartup call, and you're about there.
Somewhere I have a bunch of wrapper code that will make TCP
sockets happen the same on a host of platforms (no pun
intended), but I'm not sure what hard drive it is lurking on
right now...
Not surprisingly, the only platform that really required any
work at all to get it working was Windows.
For POSIX stuff, well, much of it is already supported in Windows, but by no
means all. If your Linux app forks, you could be in for a creative time!
LOL
--
Randy Howard (2reply remove FOOBAR)
"The power of accurate observation is called cynicism by those
who have not got it." - George Bernard Shaw
.
- Follow-Ups:
- Re: linux to windows porting help
- From: Richard Heathfield
- Re: linux to windows porting help
- References:
- linux to windows porting help
- From: vamsi
- Re: linux to windows porting help
- From: Richard Heathfield
- linux to windows porting help
- Prev by Date: Re: What is best searching algorithm for URL
- Next by Date: Source Code Wiki Start-Up Community
- Previous by thread: Re: linux to windows porting help
- Next by thread: Re: linux to windows porting help
- Index(es):
Relevant Pages
|