problem with zeosdbo-6.6.4 on winCE
Moderators: gto, EgonHugeist
problem with zeosdbo-6.6.4 on winCE
Hi,
use zeosdbo-6.6.4 on win32,the programe run ok,but on winCE,the programe not run,only change target OS ,target Cpu and LCL Widget for WINCE.why? thinks.
use zeosdbo-6.6.4 on win32,the programe run ok,but on winCE,the programe not run,only change target OS ,target Cpu and LCL Widget for WINCE.why? thinks.
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
Yes,
I believe there's a possibility to compile CE programs when using FPC/Lazarus, but I have no idea if this is working or not. I remember we once removed some assembler code to avoid crossbuilding problems on FPC. I don't have CE and I wonder if any active zeoslib member has experience with this OS.
A possible reasons for failure I can imagine : dll interfaces that differ between CE and regular windows versions.
Mark
I believe there's a possibility to compile CE programs when using FPC/Lazarus, but I have no idea if this is working or not. I remember we once removed some assembler code to avoid crossbuilding problems on FPC. I don't have CE and I wonder if any active zeoslib member has experience with this OS.
A possible reasons for failure I can imagine : dll interfaces that differ between CE and regular windows versions.
Mark
-
- Fresh Boarder
- Posts: 10
- Joined: 18.05.2009, 08:19
I try to use ZeosLib on wince with Lazarus. I've met some problem:
a) Compiler error, in details in ZplainLoader unit in the
function TZNativeLibraryLoader.LoadNativeLibrary I made this fix (only for right compiling)
From
Handle := LoadLibrary(PChar(Location));
to
{$IFDEF WINCE}
Handle := LoadLibrary(PWideChar(Location));
{$ELSE}
Handle := LoadLibrary(PChar(Location));
{$ENDIF}
and from
function TZNativeLibraryLoader.GetAddress(ProcName: PChar): Pointer;
begin
Result := GetProcAddress(Handle, pchar(ProcName));
end;
to
function TZNativeLibraryLoader.GetAddress(ProcName: PChar): Pointer;
begin
{$IFDEF WINCE}
Result := GetProcAddress(Handle, pWidechar(ProcName));
{$ELSE}
Result := GetProcAddress(Handle, pchar(ProcName));
{$ENDIF}
end;
another problem is in Zabstractrwodataset unit where the line
{$IFNDEF UNIX}
if doOemTranslate in FOptions then
begin
if ToOem then
CharToOem(Src, Dest)
else OemToChar(Src, Dest);
Dest[Result] := #0;
end
else
{$ENDIF}
goes in error (Chartoem and Oemtochar not fuond).
I add a compiler directive like this
{$IFNDEF WINCE}
{$IFNDEF UNIX}
if doOemTranslate in FOptions then
begin
if ToOem then
CharToOem(Src, Dest)
else OemToChar(Src, Dest);
Dest[Result] := #0;
end
else
{$ENDIF}
{$ENDIF}
and the compiler didn't return error. Then I run my project with a form within a Zconnection object with sqlite-3. when I run the app on Wince I get on error
Ebuserror: Bus error on misaligned data access.
I think that ZeosLib doesn't use the wince sqlite dll version right...
a) Compiler error, in details in ZplainLoader unit in the
function TZNativeLibraryLoader.LoadNativeLibrary I made this fix (only for right compiling)
From
Handle := LoadLibrary(PChar(Location));
to
{$IFDEF WINCE}
Handle := LoadLibrary(PWideChar(Location));
{$ELSE}
Handle := LoadLibrary(PChar(Location));
{$ENDIF}
and from
function TZNativeLibraryLoader.GetAddress(ProcName: PChar): Pointer;
begin
Result := GetProcAddress(Handle, pchar(ProcName));
end;
to
function TZNativeLibraryLoader.GetAddress(ProcName: PChar): Pointer;
begin
{$IFDEF WINCE}
Result := GetProcAddress(Handle, pWidechar(ProcName));
{$ELSE}
Result := GetProcAddress(Handle, pchar(ProcName));
{$ENDIF}
end;
another problem is in Zabstractrwodataset unit where the line
{$IFNDEF UNIX}
if doOemTranslate in FOptions then
begin
if ToOem then
CharToOem(Src, Dest)
else OemToChar(Src, Dest);
Dest[Result] := #0;
end
else
{$ENDIF}
goes in error (Chartoem and Oemtochar not fuond).
I add a compiler directive like this
{$IFNDEF WINCE}
{$IFNDEF UNIX}
if doOemTranslate in FOptions then
begin
if ToOem then
CharToOem(Src, Dest)
else OemToChar(Src, Dest);
Dest[Result] := #0;
end
else
{$ENDIF}
{$ENDIF}
and the compiler didn't return error. Then I run my project with a form within a Zconnection object with sqlite-3. when I run the app on Wince I get on error
Ebuserror: Bus error on misaligned data access.
I think that ZeosLib doesn't use the wince sqlite dll version right...
Hi,
it would be very kind explain to us how you have configured lazarus in order to compile Zeos with wince compiler, because lots of people asks for it.
I suppose you donloaded lazarus 0.9.26.2 + lazarus-qt-0.9.23-fpc-2.2.0-20071028-win32.exe
but How to configure lazarus in order to compile with the Wince compiler and give you a hand?
it would be very kind explain to us how you have configured lazarus in order to compile Zeos with wince compiler, because lots of people asks for it.
I suppose you donloaded lazarus 0.9.26.2 + lazarus-qt-0.9.23-fpc-2.2.0-20071028-win32.exe
but How to configure lazarus in order to compile with the Wince compiler and give you a hand?
-
- Fresh Boarder
- Posts: 10
- Joined: 18.05.2009, 08:19
I dowload the lazarus+ 2.2.5 fpc version from lazarus daily snapshot (http://www.hu.freepascal.org/lazarus/).
I download Lazarus and the Win32->Arm setup...
Hope this help...
I download Lazarus and the Win32->Arm setup...
Hope this help...
-
- Fresh Boarder
- Posts: 10
- Joined: 18.05.2009, 08:19
To install, first install lazarus and then lazarus win32_arm (both in the same directory, for example c:\lazarus)
Once install lazarus, create a new project an then goes to
Project / Compiler Option..
In the first tab select Wince(beta) as widgets type (the combo on the botton) then in the third tab (Code) select as Destination SO (-T) Wince, as Target CPU family (-P) choose arm.
You could try to press the Test button to check if everything is ok.
Confirm the form and press Build...
Once install lazarus, create a new project an then goes to
Project / Compiler Option..
In the first tab select Wince(beta) as widgets type (the combo on the botton) then in the third tab (Code) select as Destination SO (-T) Wince, as Target CPU family (-P) choose arm.
You could try to press the Test button to check if everything is ok.
Confirm the form and press Build...
-
- Fresh Boarder
- Posts: 16
- Joined: 22.02.2009, 17:21
I will pay more attention to this thread, because it is hard to find a free WINCE(WM) local DB file system, especially for Pascal language, But last time I used lazarus few minutes, it built a LARGE SIZE program for win32, it was terrible for me, even if I unchecked the debug msg from the project options.
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
Ever tried to 'strip' and eventually 'upx' the result? For me this reduces the size of the Lazarus IDE from 117 MB to 2.5 MB.
I admit, it would be nice if fpc or Lazarus would allow to execute this by setting compiler options.
Personally I execute following commands in a batch file after compiling Lazarus:
It makes loading the IDE very fast and until now I never had problems with the functionality of the program.
Mark
I admit, it would be nice if fpc or Lazarus would allow to execute this by setting compiler options.
Personally I execute following commands in a batch file after compiling Lazarus:
Code: Select all
fpc\2.2.2\bin\i386-win32\strip --strip-all --discard-all lazarus*.exe
fpc\2.2.2\bin\i386-win32\upx --best lazarus*.exe
Mark