Static linking of postgresql drivers



  • when trying to link my linux (CentOS 7) application against static qt 5 libraries I get the following error:

    debug/app_debug_plugin_import.o: In function `StaticQPSQLDriverPluginPluginInstance::StaticQPSQLDriverPluginPluginInstance()':
    <src>/app_debug_plugin_import.cpp:24: undefined reference to `qt_static_plugin_QPSQLDriverPlugin
    

    linking to the mysql plugin works.
    I followed the tutorial here: http://doc.qt.io/qt-5/sql-driver.html#qpsql
    And I have both plugins (libqsqlpsql.a and libqsqlmysql.a) But the mysql plugin defines the function: qt_static_plugin_QMYSQLDriverPlugin()
    While the psql plugin has no equivalend function.

    What am I missing.

    Thanks in advance


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    What parameters did you pass to configure ?

    Did you also follow the static plugin documentation ?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.