[fpc-pascal]GTK in Win32
Kuba Ober
winnie at hoth.amu.edu.pl
Wed Nov 29 15:24:34 CET 2000
> > > I noticed FPC isn't seeing the GTK I have installed. When I installed
GIMP
> > > it put the DLLs needed by FPC in "C:\Program Files\Common Files\GTK\".
Is
> > > there any way FPC (or Windows) could be told to look for the DLLs here
as
> > > well as in the path (I don't want to have to add something else to my
path
> > > (it's getting pretty lengthy)).
> > FPC doesn't look for the DLL's itself. It's windows that loads the
> > executable and tries to
> > find the required dlls.
> GIMP manages to be able to find the DLLs on its own. What method does
> GIMP use to tell where the DLLs are? (Since GTK+ is only available with
> GIMP (Is there any other installations of it?))
You can dynamically load libraries in Windows programs, but methinks that it
also requires writing wrappers around all functions. Wrappers get the address
of the function and then do the call. You can also resort to calling function
by address (function variables) and first initialize those upon loading of
the library.
Windows generally looks for .dlls in the path and executable's own directory.
I don't think it can be made to look anywhere else, although what you can do
is simply copy or move the dll's to \windows or \windows\system. That's what
all applications do to make their dll's visible. You can write a short
program to remove them upon uninstall, if you're not using stock installer
like Windows Installer (free from M$) or InstallShield or somesuch.
Kuba
More information about the fpc-pascal
mailing list