[fpc-pascal] Dynamic linking variables

ik idokan at gmail.com
Fri Oct 26 16:01:53 CEST 2007


On 10/25/07, Michael Van Canneyt <michael at freepascal.org> wrote:
>
>
> On Thu, 25 Oct 2007, ik wrote:
>
> > On 10/25/07, Marc Santhoff <M.Santhoff at t-online.de> wrote:
> > > Am Donnerstag, den 25.10.2007, 11:12 +0200 schrieb ik:
> > > > Hello List,
> > > >
> > > > I'm binding FAM/GAM to Pascal, and I do it in two flavors: static and
> > > > dynamic linking (depending on the define). I found out that I require
> > > > to link two variables with the library.
> > > > How can dynamic link a variable using FPC ?
> > >
> > > If you're talking about a variable in a dynamically linked lib declaring
> > > like this
> > >
> > >   myvar: integer; cvar; external;
> > >
> > > should do.
> > >
> > > If you want to load a library dynamically at runtime using
> > > LoadLibrary/dlload, I don't know.
> >
> > Yes, that's what I was asking :)
>
> You cannot do this with a single construct; You need a pointer in the case
> of a dynamically loaded library.

I'm not sure that I understand. can you please point me to an example ?

>
> Michael.

Thanks,
Ido
-- 
http://ik.homelinux.org/



More information about the fpc-pascal mailing list