Important: Please read the Qt Code of Conduct -

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:
    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