MySQL Forums
Forum List  »  Source, Builds, Binaries

Compiling/linking with unixODBC on OS X
Posted by: Brian Panulla
Date: July 25, 2012 01:06PM

I'm trying to install MySQL Connector/ODBC 5.1.11 from source on Mac OS X Lion (10.7) using the unixODBC manager installed via MacPorts. The compilation appears to work until it tries to link to the unixODBC library.

When using MacPorts almost everything interesting is installed under /opt/local. I built the make files with the following command:

cmake -G "Unix Makefiles" \
-DODBC_INCLUDES=/opt/local/include \
-DODBC_LIB_DIR=/opt/local/lib \
-DMYSQL_INCLUDE_DIR=/opt/local/include/percona/mysql/ \
-DMYSQL_LIB_DIR=/opt/local/lib/percona/mysql/ \

When I issue "make", the build proceeds without issue until it tried to link to unixODBC:

Linking C shared module ../lib/
ld: library not found for -lodbcinst
collect2: ld returned 1 exit status
make[2]: *** [lib/] Error 1
make[1]: *** [driver/CMakeFiles/myodbc5.dir/all] Error 2
make: *** [all] Error 2

My odbcinst lib is at:

Is there a configuration flag I'm missing?

Options: ReplyQuote

Written By
Compiling/linking with unixODBC on OS X
July 25, 2012 01:06PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.