[Lazarus] Pascal Time Zone handling

JoshyFun joshyfun at gmail.com
Mon Nov 9 23:04:38 CET 2009


Mattias Gärtner wrote:
> 
> It should be possible.

Even with different include paths per platform?


> Have unchecked 'use unit'?

Yes, it's unchecked. I did so to optimize linking and produce smaller
executables - which only include the units it really needs. But if I
need to enable this again, it's not a problem really.


> What error do you get?

Can't find units because of wrong include paths being used and then the
windows cross-compilation complains about 'unit x' not being found. I
also have to do some trickery with the platform types. So I have a
"alias" types defined in each backend (platform specific) directory. But
the unit name is the same for all platforms.

eg:
Both of these have the same unit names and same types, but based on the
platform, they translate to something different.

------------[ corelib/x11/fpg_impl.pas ]--------------
unit fpg_impl;

{$mode objfpc}{$H+}

interface

uses
  x;

type
    TfpgWinHandle = TXID;
    TfpgDCHandle  = TXID;

implementation

end.
------------------------------------------------------


--------------[ corelib/gdi/fpg_impl.pas ]-------------
unit fpg_impl;

{$mode objfpc}{$H+}

interface

uses
  Windows;

type
    TfpgWinHandle = HWND;
    TfpgDCHandle  = HDC;

implementation

end.
-----------------------------------------------------



>> to remove the dependency first (By thew trunk Lazarus crashes with AV
>> when I remove it. On restarting the IDE, I can remove it successfully).
> 
> Can you reproduce the problem?

Yes, I can reproduce every time, and on IDE restart it works.


> Can you send me a backtrace?

I do so after this email, using a new subject.


> Or use 'fpc' as compiler.
> Why change FPC source path?

As explained in my previous reply. FPC 64bit with uses 2.3.1 cannot
cross-compile a 32bit FPC for 2.3.1. So I went back to linux 32bit FPC
2.2.5 to cross-compile FPC 2.2.5 32bit windows compiler.


>> 7) Click Compile in Lazarus.
> 
> yes, that is needed.

You and Vincent think the same! :-)



Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/





More information about the Lazarus mailing list