Re: linux to windows porting help



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? :-)

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.

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!

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
.



Relevant Pages

  • linux to windows porting help
    ... I am working on a project that involves porting c programs from ... linux environment to windows environment. ... Any references for this related topics is highly appreciated. ...
    (comp.programming)
  • UDP sockets
    ... I'm porting a client writen in C++ to python. ... timeout in an select for one socket? ...
    (comp.lang.python)