2009/3/23 Andreas Pakulat <[email protected]> > > Are you sure yout Qt4.5 has the mysql plugin built in? There's only two > cases for the plugins (AFAIK): > > a) real plugins as shared objects in the plugins dir > b) built directly into the static Qt libs > > So obviously in case a) you don't need to link against the mysql-plugin, > because Qt will load it itself during runtime and in the second case it > should be part of the QtSql library. >
> Can you show the relevant cpp file and cmake code? > > Andreas > <http://www.cmake.org/mailman/listinfo/cmake> I can build the code correctly against a fully shared Qt 4.4.0 build (I've yet to try it against a shared Qt 4.5.0). I've built Qt 4.5.0 statically, and I see that the MySQL plugin is built into plugins/sqldrivers: $ ls plugins/sqldrivers/ libqsqlite.a libqsqlmysql.a nm indicates that libqsqlmysql.a contains the relevant symbol: $ nm plugins/sqldrivers/libqsqlmysql.a | grep qt_plugin_instance_qsqlmysql 00000100 000000d7 T _Z28qt_plugin_instance_qsqlmysqlv 00000000 00000008 b _ZGVZ28qt_plugin_instance_qsqlmysqlvE9_instance 00000008 00000004 b _ZZ28qt_plugin_instance_qsqlmysqlvE9_instance and this symbol doesn't appear in QtSql: $ nm lib/libQtSql.a | grep qt_plugin_instance_qsqlmysql $ This is why I am assuming that I need to link against libqsqlmysql.a explicitly when linking statically. Steve Collyer
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
