Hi
I am trying to convert a program in Delphi Xe 5 using zeos 7.1.4-stable to use firebird, protocol firebird-2.5. I hjave copied and renamed according to the instructions all the DLLs, but when I set Connected := true on it, I get this error message:
None of the dynamic libraries can be found or is not loadable: D:\Dev ..\Win32\Debug\!
Use TZConnection.LibraryLocation if the location is invalid.
I tried setting LibraryLocation to ExtractFilePath(ParamStr(0)), but the same error message appears.
A quick google didn't show up a solution. Any ideas?
TIA
Mark Patterson
Getting Library error trying to open Firebird
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: Getting Library error trying to open Firebird
Hello Mark,
I know that one of my programs has problem using firebird embedded when the program executable and the library are not located on the c drive. I already debugged into that but found that it is not easily fixable.
Usually if you leave the host name blank and the library is located next to the executable everything should work fine. Did you also copy the rest of the firebird embedded stuff int your directiry? Like the icu*.dll and msvc*80.dll files? Probably the fbembed.dll cannot be loaded without the last ones? I usually distribute the complete contents of the embedded firebird zip file without the documentation folders.
With best regards,
Jan Baumgarten
I know that one of my programs has problem using firebird embedded when the program executable and the library are not located on the c drive. I already debugged into that but found that it is not easily fixable.
Usually if you leave the host name blank and the library is located next to the executable everything should work fine. Did you also copy the rest of the firebird embedded stuff int your directiry? Like the icu*.dll and msvc*80.dll files? Probably the fbembed.dll cannot be loaded without the last ones? I usually distribute the complete contents of the embedded firebird zip file without the documentation folders.
With best regards,
Jan Baumgarten
Re: Getting Library error trying to open Firebird
I tried moving the directory of dlls to C:\Program Files (x86)\firebirdeb\, but still got the same error, and set LibraryLocation to match.
Could it have anything to do with running on a 64-bit machine?
This is surprising, because we were recently trying out SQLite, which required a DLL dropped into an available directory, and that worked with Zeos with no extra work.
Anyone?
TIA
Mark
Could it have anything to do with running on a 64-bit machine?
This is surprising, because we were recently trying out SQLite, which required a DLL dropped into an available directory, and that worked with Zeos with no extra work.
Anyone?
TIA
Mark
Re: Getting Library error trying to open Firebird
Hostname is blankmarsupilami wrote:Hello Mark,
Usually if you leave the host name blank and the library is located next to the executable everything should work fine. Did you also copy the rest of the firebird embedded stuff int your directiry? Like the icu*.dll and msvc*80.dll files? Probably the fbembed.dll cannot be loaded without the last ones? I usually distribute the complete contents of the embedded firebird zip file without the documentation folders.
My first attempt was with the library in the same path as the executable.
I tried the normal Program Files (86) path to have it on the C drive
I tried a shorter path on the C drive: C:\comcraft\firebirdeb
I have copied all the files from the intl and udf subdirs into the same folder as fbembed.dll
I have made copies of fbembed.dll called fbclient.dll and gds32.dll.
But I have the same result each time. "None of the dynamic libraries can be found or is not loadable: ... Use TZConnection.LibraryLocation if the location is invalid"
I don't know what the error means exactly, except that our project is at a standstill. Any help welcome.
Regards
Mark
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: Getting Library error trying to open Firebird
Hello Mark,
just to be sure: your executable is in the same directory as the new fbclient.dll? And your Executable and the fbclient.dll do both use the same bits (both 32 bits or both 64 bits)? Again - this is just to be sure.
I have to admit I do load the fblient.dll on my own and do not rely on Zeos. Maybe it helps if you debug into this and try to load the library youself using LoadLibrary? I do use something like this:
For documentation about LoadLibrary see https://msdn.microsoft.com/en-us/librar ... 85%29.aspx
With best regards,
Jan
just to be sure: your executable is in the same directory as the new fbclient.dll? And your Executable and the fbclient.dll do both use the same bits (both 32 bits or both 64 bits)? Again - this is just to be sure.
I have to admit I do load the fblient.dll on my own and do not rely on Zeos. Maybe it helps if you debug into this and try to load the library youself using LoadLibrary? I do use something like this:
Code: Select all
procedure TTestForm.PreloadLibrary;
var
FileName: String;
begin
if FLibraryHandle <> 0 then FreeLibrary(FLibraryHandle); //FLibraryHandle is of type THandle
FileName := ExtractFilePath(ParamStr(0)) + 'fbclient.dll';
if (FileName = '') or (not FileExists(FileName))
then raise Exception.Create('The library file ' + FileName + ' doesn't exist.')
FLibraryHandle := LoadLibrary(PChar(FileName));
if FLibraryHandle = 0 then RaiseLastOsError;
end;
With best regards,
Jan
Re: Getting Library error trying to open Firebird
Thanks,
We have solved it. It seems that you need all the dlls in the same directory as the exe. I had thought I was doing that, but must have missed one. Now it works.
We have solved it. It seems that you need all the dlls in the same directory as the exe. I had thought I was doing that, but must have missed one. Now it works.