[Lazarus] Using WineLib with FreePascal or Lazarus?

Juha Manninen juha.manninen at phnet.fi
Sun Nov 8 11:51:45 CET 2009


Hi,

>   Does anyone here have experience with using WineLib with FPC or Lazarus?
> Basically a company's application, that I'm doing a tender for, has
> licensed a Win32 DLL that they do not have the source for. They want their
> Delphi application ported to Mac OS X and Linux.
> 
> Tests show that using Wine/CrossOver that the DLL calls work correctly.
> What I'd like to do is Compile an FPC application with WineLib so that we
> can continue using this DLL.
> 
> The only other possibility would be to create C or Lazarus shared object
> that links to WineLib which in turn, talks to the DLL. Then my app would
> call the Shared Object on both Mac OS X and Linux and WineLib would do its
> magic.
> 
> Are either of these solutions possible? Is there a flaw in my plan?

I haven't used WiniLib but I have tested some Windows programs under Wine.
My experience is that you are looking for trouble when using Wine.
Many programs work only "almost" correctly, there are always some weird things 
happening. Even the programs that work are slow. The speed overhead can be 
huge, like ten times slower than under real Windows.

So, I recommend that you find some alternative method or library. There are 
many libraries available WITH source code. If they work in Delphi only, they 
can be ported to Lazarus / FPC.

When I programmed with Delphi I had a principle of never using a library 
without source code! Free or commercial, doesn't matter, it must have source 
code. I heard horror stories of companies who are forced to use Delphi 3 for 
some projects because they use a closed library without source code and the 
supplier went down already years ago.


Regards,
Juha Manninen




More information about the Lazarus mailing list