[fpc-pascal] linking to dll still fails

Michael Van Canneyt michael at freepascal.org
Sun Jun 8 11:34:16 CEST 2008



On Sat, 7 Jun 2008, Marc Santhoff wrote:

> Am Samstag, den 07.06.2008, 10:24 +0200 schrieb Michael Van Canneyt:
> > 
> > On Sat, 7 Jun 2008, Marc Santhoff wrote:
> > 
> > > Hi,
> > > 
> > > I still have no success in linking against a dll on windows.
> > > 
> > > The dll import source looks like this:
> > > 
> > > ...
> > > {$linklib 'hdf5'}
> > 
> > You should change this to {$linklib hdf5.dll} for windows. Otherwise the compiler
> > will try to link to a static library.
> 
> Nice pitfall, I didn't find that in the docs.
> 
> But however, it did not make a change (see below). Meanwhile I adapted
> the import statemments to be sure, but it doesn't help.

Hm. what options did you specify on the command-line, and what options
are in the configuration files ?

> 
> Another part is to adapt the declaration of variables. Currently they
> are defined like this:
> 
> H5T_NATIVE_SCHAR_g : hid_t;cvar;external;
> 
> and as you can see in the fpcdebug.txt the name mangling is wrong:
> 
> 10000002:Error: Undefined symbol: _H5T_NATIVE_SCHAR_g
> 
> How does it have to be defined for Windows?

No idea; it probably depends on the used C compiler ?


Michael.



More information about the fpc-pascal mailing list