Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2000-11

GTK in Win32

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Jeff Patterson

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)).

Peter Vreman
Show quoted text 5 lines
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.

Jeff Patterson
to Peter Vreman

----- Original Message -----

Earlier message 22 lines
From: "Peter Vreman" To: Sent: Monday, November 20, 2000 3:50 AM Subject: Re: [fpc-pascal]GTK in Win32 > > 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?))
Kuba Ober
to Jeff Patterson
> > 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

Show quoted text 9 lines
> > (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