PostgreSQL libpq.dylib not working

Why does System.IsFunctionAvailable ( “PQlibVersion”,"/usr/lib/libpq.dylib" ) always return false?
The file is there.
I also get a FunctionNotFoundException then I use any soft declare function like:
soft declare function PQconnectdb lib “/usr/lib/libpq.5.5.dylib” (ByRef conninfo As CString) as Ptr


probably a 64 bit lib ?
what does the command (in terminal) return

file /usr/lib/libpq.dylib

here I get

/usr/lib/libpq.dylib: Mach-O 64-bit dynamically linked shared library x86_64

and, since Xojo creates 32 bit apps you cant load a 64 bit dylib

Yes, it is 64-bit…
So, where do I get a 32 bit version?

download 32-bit postgres.

Here are the Postgres libraries you’ll need for SQLDatabaseMBS to talk on Mac, Windows and Linux. Just create a CopyFile for each of the locations.

And here are the equivalent MySQL Libraries for use with SQLDatabaseMBS.

OK, here I go again, here are the equivalent DB2 Libraries for use with SQLDatabaseMBS! The Windows and Linux versions work, but I could never get the Mac version to work. If someone can get it working and provide me the correct .dylib combination I would be very appreciative!

The only way I had it working is through Java, jdb libraries.
I think, the version of db2 which was meant to run on OS X has never been finished.

You can download IBM’s Express-C for Macintosh and run it. It installs a whole lot of .dylib files and I have tried to connect using them all in a variety of locations (like I did with Postgres and MySQL) but to no avail — it would never connect. If you do connect, then you have to work out what chaff you can safely throw away to keep the size down.

Can you please explain how you got DB2 working through the Java/jdb libraries? Is that using SQLDatabaseMBS as well? I would love to have a full suite of all SQLDatabaseMBS libraries for all databases available! Someone else was working on MSSQL, but I don’t know if they succeeded.

Yes, I am using MBS SQL plugins plus db2jcc.jar

A zipped sample project with db2jcc is here

I installed DB2 on a Windows Server on VMWare. The sample project was tested on OSX

At the time when I did these tests, I also tried to install the whole DB2 thing on OSX, but never succeeded. I also thought I could grab the necessary libs like that, but gave up on it. I’m pretty sure it just doesn’t work.

I’m still missing something. I installed PostgreSQL.
file command returns this:
/usr/lib/libpq.5.7.dylib: Mach-O universal binary with 2 architectures
/usr/lib/libpq.5.7.dylib (for architecture i386): Mach-O dynamically linked shared library i386
/usr/lib/libpq.5.7.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
and I still can’t see the functions in xojo
System.IsFunctionAvailable ( “PQlibVersion”,"/usr/lib/libpq.5.7.dylib" ) returns False

What am I missing here?

To use PostgreSQL with SQLDatabaseMBS on Windows I only need the following (note the dll/dylib/so files MUST be in the ‘lib’ subfolder or it doesn’t work — must be a PostgreSQL issue):
In the Resources folder:
lib > libpq.dll

In the Framework folder:

For Macintosh all you need is in the Resources folder:
lib > libcrypto.1.0.0.dylib
lib > libpq.5.6.dylib
lib > libssl.1.0.0.dylib

For Linux all you need is in the Resources folder:
lib >
lib >
lib >