[lazarus] porting Windows socket app to Linux

michael at tfdec1.fys.kuleuven.ac.be michael at tfdec1.fys.kuleuven.ac.be
Wed Dec 22 02:59:50 EST 1999




On Tue, 21 Dec 1999, Anulio Ruggierro wrote:

> Hi, I am interested in porting a Win32 application which only uses the 
> WinAPI socket library to Linux (Red Hat 6.0+).  I was wondering if this can 
> be one with Lazarus Free Pascal without any changes to the code (it was 
> written in Delphi).  The app does not use MFCs or anything like that (there 
> is no GUI at all), it only makes calls from the standard WInAPI, so it 
> should be fairly easy to port.  I was initially going to rewrite the Delphi 
> code in C++, and then port it, but then I ran accross this project and 
> figured it may be easier.

You shouldn't have any problems other than changing WinAPI calls to the
appropriate Linux calls. There is a sockets unit that contains low-level
socket handling, and the 'inet' contributed unit has name resolution stuff 
in it. Using these, I guess it should be fairly easy to port.

Michael.






More information about the Lazarus mailing list