
Originally Posted by
schnitzel
are you running your app from inside QtCreator?
Make sure you MySQL install includes the development files (lib + include files)
I'm not too familiar with Mac, but can't you run ldd on the executable to see if all libs can be found?
On windows, I copied the lib and include files into a folder without spaces before building the plugin:
c:/mysql
include/...
lib/...
c:/mysql
include/...
lib/...
To copy to clipboard, switch view to plain text mode
I've tried running the app from both inside Qt Creator and normally; it didn't work either way. I have the development files for MySQL.
I used otool on the generated library file, and got this:
libqsqlmysql.dylib (compatibility version 0.0.0, current version 0.0.0)
libmysqlclient.18.dylib (compatibility version 18.0.0, current version 18.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.1)
/usr/local/Trolltech/Qt-4.7.2/lib/QtSql.framework/Versions/4/QtSql (compatibility version 4.7.0, current version 4.7.2)
/usr/local/Trolltech/Qt-4.7.2/lib/QtCore.framework/Versions/4/QtCore (compatibility version 4.7.0, current version 4.7.2)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 830.0.0)
libqsqlmysql.dylib (compatibility version 0.0.0, current version 0.0.0)
libmysqlclient.18.dylib (compatibility version 18.0.0, current version 18.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.1)
/usr/local/Trolltech/Qt-4.7.2/lib/QtSql.framework/Versions/4/QtSql (compatibility version 4.7.0, current version 4.7.2)
/usr/local/Trolltech/Qt-4.7.2/lib/QtCore.framework/Versions/4/QtCore (compatibility version 4.7.0, current version 4.7.2)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 830.0.0)
To copy to clipboard, switch view to plain text mode

Originally Posted by
unix7777
I followed the instruction of compiling the MySQL driver on Mac OS 10.6 but i receive the following error:
In file included from main.cpp:44:
../../../sql/drivers/mysql/qsql_mysql.h:52:19: error: mysql.h: No such file or directory
In file included from main.cpp:44:
../../../sql/drivers/mysql/qsql_mysql.h:108: error: expected `)' before ‘*’ token
make[1]: *** [debug/main.o] Error 1
make: *** [debug] Error 2
could somebody describe in details how exactly must be compile and install MySQL driver on Mac OS X.And also, is there any binary that could be used on random Mac?
Have you told it where the MySQL include files are found? My MySQL installation is in /usr/local/mysql, so I put this in my mysql.pro:
INCLUDEPATH += /usr/local/mysql/include
LIBS += -L/usr/local/mysql/lib -lmysqlclient_r
INCLUDEPATH += /usr/local/mysql/include
LIBS += -L/usr/local/mysql/lib -lmysqlclient_r
To copy to clipboard, switch view to plain text mode
Bookmarks