<br><br><div class="gmail_quote">2009/3/23 Andreas Pakulat <span dir="ltr"><<a href="mailto:apaku@gmx.de">apaku@gmx.de</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="h5">
<br>
</div></div>Are you sure yout Qt4.5 has the mysql plugin built in? There's only two<br>
cases for the plugins (AFAIK):<br>
<br>
a) real plugins as shared objects in the plugins dir<br>
b) built directly into the static Qt libs<br>
<br>
So obviously in case a) you don't need to link against the mysql-plugin,<br>
because Qt will load it itself during runtime and in the second case it<br>
should be part of the QtSql library.<br>
</blockquote><div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Can you show the relevant cpp file and cmake code?<br>
<br>
Andreas<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank"></a></blockquote><div> </div>I can build the code correctly against a fully shared Qt 4.4.0 build (I've yet to<br>try it against a shared Qt 4.5.0). I've built Qt 4.5.0 statically, and I see that<br>
the MySQL plugin is built into plugins/sqldrivers:<br></div><br>$ ls plugins/sqldrivers/<br>libqsqlite.a libqsqlmysql.a<br><br>nm indicates that libqsqlmysql.a contains the relevant symbol:<br><br>$ nm plugins/sqldrivers/libqsqlmysql.a | grep qt_plugin_instance_qsqlmysql<br>
00000100 000000d7 T _Z28qt_plugin_instance_qsqlmysqlv<br>00000000 00000008 b _ZGVZ28qt_plugin_instance_qsqlmysqlvE9_instance<br>00000008 00000004 b _ZZ28qt_plugin_instance_qsqlmysqlvE9_instance<br><br>and this symbol doesn't appear in QtSql:<br>
<br>$ nm lib/libQtSql.a | grep qt_plugin_instance_qsqlmysql<br>$ <br><br>This is why I am assuming that I need to link against libqsqlmysql.a explicitly when linking statically.<br><br>Steve Collyer<br>