MySQL Forums
Forum List  »  Connector/C (libmysql)

OSX Yosemite, libmysqlclient and bad path?
Posted by: 7 reeds
Date: November 25, 2015 01:49PM

Hi,

I am using netbeans on OS X trying to port an application to OS X. The app has two internal static libraries (one has the mySQL logic); a stand-alone command line executable; and, a stand-alone ".so" shared object (a "plug-in" for a third party app). The executable and the shared object are built with the internal libs.

Compiling and linking work fine using g++ or clang. Executing the command line tool fails with the message:

dyld: Library not loaded: /usr/local/mysql/lib/libmysqlclient.18.dylib
Referenced from: /Users/me/project/Project_Console/dist/Debug_OSX/CLang-MacOSX/projrct
Reason: image not found
Trace/BPT trap: 5

Ok, first, I directly specified the full path to the "static" versions of mysqlclient and the c++ mysqlcppconn

clang++ -O2 -Wall -fmessage-length=0 -o dist/Debug_OSX/CLang-MacOSX/project build/Debug_OSX/CLang-MacOSX/project.o -L../Projrct_LIB/dist/Debug/GNU-MacOSX -L../ProjectUtilities/dist/Debug/GNU-MacOSX -L/usr/local/mysql-connector-c/lib -L/usr/local/mysql-connector-c++/lib -lpam -lpcre -lsqlite3 -litgutilities -lusertracking /usr/local/mysql-connector-c/lib/libmysqlclient.a /usr/local/mysql-connector-c++/lib/libmysqlcppconn-static.a -stdlib=libstdc++ -dynamiclib -install_name projct

Notice that I am not referring to .usr/local/mysql at all. Why is it trying to pick up a nonexistent lib?

Options: ReplyQuote


Subject
Views
Written By
Posted
OSX Yosemite, libmysqlclient and bad path?
1227
November 25, 2015 01:49PM


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.