Unsolved QMYSQL driver not loaded on MACos
-
Platform:
Macos 10.14
Mysql 8.0.17
Qt 5.9.8Hi guys, when i run the code in qt creator it warns that
I followed the directions provided in the forum , but it still didn't work.
when i run "-otool -L libqsqlmysql.dylib" , it shows/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/objdump: 'libqsqlmysql.dylib': No such file or directory
actually i found that in the folder "/Users/edwinxxxx/Qt5.9.8/5.9.8/plugins/sqldrivers" there exists the file "libqsqlmysql.dylib" absolutely.
and in "user/local/mysql/" i can find the file "libmysqlclient.21.lib"
so why i cant find any folder or file like "/opt/local/mysql55..." and "libmysqlclient.18.lib"?
how can i run "install_name_tool" to make it connect?
i have been upset for a long time.looking forward to your help.really big thx:) -
@edwinxxxx Use absolute path to libqsqlmysql.dylib
otool -L /Users/edwinxxxx/Qt5.9.8/5.9.8/plugins/sqldrivers/libqsqlmysql.dylib
If the driver can't be loaded then most probably MySQL client library is missing.
What doesldd /Users/edwinxxxx/Qt5.9.8/5.9.8/plugins/sqldrivers/libqsqlmysql.dylib
output?
-
@jsulm wow! i use the absolute path, so it works?