OSX Mountain Lion Can not load default MySQL library libmysqlclient.dylib.16 lazarus / 16-Databases ---------------------------------------------------------------------- cyang · 2013-03-14 23:47 I have downloaded and installed the latest Lazarus 1.0.6, but when I try to connect to my remote MySQL 5.1 server using MySQL51Connection, I am getting "Can not load default MySQL library libmysqlclient.dylib.16 error message. I have google and tried a few of the solutions, none of them is working. I was wondering what is the "official" solution to solve this error message. Here is what I have in mysql lib /opt/local/lib/mysql5/mysql drwxr-xr-x  23 root  admin       782 Jan 10 10:33 . drwxr-xr-x   4 root  admin       136 Jan 10 10:33 .. -rw-r--r--   1 root  admin      1032 Jan 10 10:33 libdbug.a -rw-r--r--   1 root  admin     92224 Jan 10 10:33 libheap.a -rw-r--r--   1 root  admin    455088 Jan 10 10:33 libmyisam.a -rw-r--r--   1 root  admin     77152 Jan 10 10:33 libmyisammrg.a -rwxr-xr-x   1 root  admin   1459584 Jan 10 10:33 libmysqlclient.16.dylib -rw-r--r--   1 root  admin   1659288 Jan 10 10:33 libmysqlclient.a lrwxr-xr-x   1 root  admin        23 Jan 10 10:33 libmysqlclient.dylib -> libmysqlclient.16.dylib -rwxr-xr-x   1 root  admin      1028 Jan 10 10:33 libmysqlclient.la -rwxr-xr-x   1 root  admin   1467072 Jan 10 10:33 libmysqlclient_r.16.dylib -rw-r--r--   1 root  admin   1672200 Jan 10 10:33 libmysqlclient_r.a lrwxr-xr-x   1 root  admin        25 Jan 10 10:33 libmysqlclient_r.dylib -> libmysqlclient_r.16.dylib -rwxr-xr-x   1 root  admin      1040 Jan 10 10:33 libmysqlclient_r.la -rw-r--r--   1 root  admin  13758456 Jan 10 10:33 libmysqld.a -rw-r--r--   1 root  admin   1345824 Jan 10 10:33 libmystrings.a -rw-r--r--   1 root  admin    354216 Jan 10 10:33 libmysys.a -rwxr-xr-x   1 root  admin   1077108 Jan 10 10:33 libndbclient.3.dylib -rw-r--r--   1 root  admin   1770976 Jan 10 10:33 libndbclient.a lrwxr-xr-x   1 root  admin        20 Jan 10 10:33 libndbclient.dylib -> libndbclient.3.dylib -rwxr-xr-x   1 root  admin       976 Jan 10 10:33 libndbclient.la -rw-r--r--   1 root  admin     16648 Jan 10 10:33 libvio.a drwxr-xr-x  18 root  admin       612 Jan 10 10:33 plugin /usr/lib lrwxr-xr-x  1 root  wheel  48 Mar 14 16:02 libmysqlclient.dylib -> /opt/local/lib/mysql5/mysql/libmysqlclient.dylib I just don't know why is so difficult to setup Lazarus/MySQL. Need Help, and some working MySQL example on the current version 1.0.6. Thanks. Charles ---------------------------------------------------------------------- taazz · 2013-03-14 23:51 make sure that both the library and your application is of the same bitnes as far as know most lazarus installation use the 32bit fpc compiler. ---------------------------------------------------------------------- cyang · 2013-03-15 00:40 Ok, then I am out of luck. I remember OSX Mountain Lion is running 64 bits. I used macport to install local MySQL server in 64 bits, so the library are all in 64 bits. Is Lazarus every going to be 64bits for Mac OSX users? ---------------------------------------------------------------------- taazz · 2013-03-15 01:29 as far as I know you can today as long as you use the cocoa interface instead of the carbon and a 64bit fpc compiler. I have never been a mac user even less a mac developer so I have no idea how ease or not that effort will be. Also I recomend to take a look on the existing support of cocoa and its development status before you go down a road that might not support your use case. If everything else fails and you are stuck with the 32bit program then you can install the 32bit mysql client it should connect with the 64bit server with out problems.