Page 1 of 1

STRICT_DLL_LOADING

Posted: 25.09.2005, 18:14
by aperger
Hello,

Can somebody help on this?

All of the ZPlain*.pas file use this (you can see the codes), why?

MYSQL_STRICT_DLL_LOADING <> STRICT_DLL_LOADING !!!!!

How can I use this directives? I can remove some line, but is not the solution.

Example from ZPlainMySql320.pas:

Code: Select all

const
  WINDOWS1_DLL_LOCATION = 'libmysql320.dll';
{$IFNDEF STRICT_DLL_LOADING}
  WINDOWS2_DLL_LOCATION = 'libmysql.dll';
{$ENDIF}
  LINUX_DLL_LOCATION = 'libmysqlclient.so';

Code: Select all

initialization
{$IFNDEF UNIX}
  LibraryLoader := TZMySQLNativeLibraryLoader.Create(
    [WINDOWS1_DLL_LOCATION
{$IFNDEF MYSQL_STRICT_DLL_LOADING}
    , WINDOWS2_DLL_LOCATION
{$ENDIF}
    ]);
{$ELSE}
  LibraryLoader := TZMySQLNativeLibraryLoader.Create(
    [LINUX_DLL_LOCATION]);
{$ENDIF}
Perger Attila

Posted: 02.11.2005, 01:13
by Tom Dog
In Zeos.inc change {$DEFINE MYSQL_STRICT_DLL_LOADING}
to { $DEFINE MYSQL_STRICT_DLL_LOADING} to undefine it

Posted: 03.11.2005, 00:13
by Terence
I don't see any main difference between
{$DEFINE MYSQL_STRICT_DLL_LOADING}
and
{ $DEFINE MYSQL_STRICT_DLL_LOADING}

except exactly one blank, which does not have any semantic!

Posted: 03.11.2005, 04:51
by Tom Dog
It does to the Delphi compiler

It treats the first one as a compiler directive

the second all it sees is a comment

Posted: 22.11.2005, 19:50
by matsgefvert
I would prefer to write

{//$DEFINE MYSQL_STRICT_DLL_LOADING}

...if for no other reason than clarity.