[fpc-pascal] TDatabase, PostgreSQL and Mac OS X?

Vincent Snijders vsnijders at quicknet.nl
Wed Sep 27 15:42:17 CEST 2006


Jeremy Cowgar schreef:
> Leonardo, Wow. That worked. I did a symlink from libpq.dylib to libpq.so 
> and it works now.
> 
> Is there a proper way to do this on mac os x anyone?
> 
> Thanks Lenardo!
> 

Maybe apply this patch and recompile:


Index: base/postgres/dllistdyn.pp
===================================================================
--- base/postgres/dllistdyn.pp	(revision 4739)
+++ base/postgres/dllistdyn.pp	(working copy)
@@ -15,9 +15,14 @@
  {$PACKRECORDS C}

  {$IFDEF Unix}
+{$IFDEF Darwin}
    const
+    pqlib = 'libpq.dylib';
+{$ELSE}
+  const
      pqlib = 'libpq.so';
  {$ENDIF}
+{$ENDIF}
  {$IFDEF Windows}
    const
      pqlib = 'libpq.dll';
Index: base/postgres/postgres3dyn.pp
===================================================================
--- base/postgres/postgres3dyn.pp	(revision 4739)
+++ base/postgres/postgres3dyn.pp	(working copy)
@@ -15,9 +15,14 @@
    dynlibs, SysUtils, dllistdyn;

  {$IFDEF Unix}
+{$IFDEF Darwin}
    const
+    pqlib = 'libpq.dylib';
+{$ELSE}
+  const
      pqlib = 'libpq.so';
  {$ENDIF}
+{$ENDIF}
  {$IFDEF Win32}
    const
      pqlib = 'libpq.dll';


Vincent



More information about the fpc-pascal mailing list