[fpc-pascal] freepascal + mysql5 + osx

Joost van der Sluis joost at cnoc.nl
Mon Jun 23 11:52:02 CEST 2008


Op maandag 23-06-2008 om 11:33 uur [tijdzone +0200], schreef Jonas
Maebe:
> On 23 Jun 2008, at 11:28, Joost van der Sluis wrote:
> 
> > In the case of Firebird there are two possible names of the library,  
> > and
> > both are tried. Can I safely add the {$linklib ...} statements for  
> > both
> > libraries, even if one of them doesn't exist on the system?
> 
> No. But you don't need {$linklib ...} statements in case you try to  
> dynamically load libraries, only when they are linked to the program  
> at compile time.

Ok.

I guess that:

const mysqllib='libmysqlclient.'+sharedsuffix;
{$linklib mysqllib}

doesn't work? (And I don't want it to link to 'mysqllib' ;) )

> > And will the unit be compilable at all if the library is not installed
> > on the system?
> 
> Yes (linking happens when compiling a program or library that uses the  
> unit, not when compiling the unit itself).

I meant a program that uses such a unit. But as long as it don's apply
to dynamically loaded libraries it's not a problem.

Joost.




More information about the fpc-pascal mailing list