Hello everybody,
I'm an enthusiast in Lazarus and our company uses it for a database-related project for PDA (handheld computers).
However, I have a problem running a compiled application on WinCE. It's very strange.
I already reported this error here but it appears in the stable release too and I just find no solution and I want to ;-)
As from behind a mist I recall that version 0.9.24 had no such problem.
It goes to a general question: How do I load a library on WinCE? Is there something I'm doing wrong?
I use the latest official release of Lazarus (0.9.26).
Let's consider this general code:
program LibTest
uses postgres3dyn;
begin
InitialisePostgres3;
ReleasePostgres3;
end;
In the postgres3dyn.InitialisePostres3 procedure, you have this code:
Postgres3LibraryHandle := loadlibrary(pqlib);And that code fails for me - it means, Postgres3LibraryHandle then returns the nilhandle against what it is then tested on the nest line:
if Postgres3LibraryHandle = nilhandle then
begin
RefCount := 0;
Raise EInOutError.Create('Can not load PosgreSQL client. Is it
installed? ('+pqlib+')');
end;The pqlib constant reads 'libpq.dll'.
I have the library in the same directory as the executable. Should I place it (and its accompanying libraries) somewhere to the system directories?
I don't know if this would make a success because even when I try to rewrite the postgres3dyn unit to load the library from the program's folder (ExtractFilePath(Paramstr(0)) + pqlib), so with the full path, and recompile everything the right way, it still doesn't load.
Thank you for any clues and guidelines.
Pavel ?ezn??ek
