Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Static Plugins problem
I am writing a desktop Linux application using PostgreSQL. I wanted to add static plugin like here: http://doc.qt.digia.com/qt/plugins-howto.html#static-plugins . I received an error:
@/bla/bla/main.cpp:-1: error:undefined reference to `qt_plugin_instance_qsqlpsql()'@
I foun a lot of similar errors on the internet but i haven't found any solution. Can You help me?
PS: Sorry for my english :D
lgeyer last edited by
Did you Q_IMPORT_PLUGIN and have you added the plugin to QTPLUGIN?
Here's what have I done:
QTPLUGIN += qsqlpsql
in my .pro file
in main.cpp at the begining.
EDIT: I don't know if the libqt4-sql-psql package is enought for static plugin to work.
I found topic:
And a guy wrote like this:
@After configure, manually clean mkspecs/qmodule.pri: Remove -L/usr/lib64 or -L/usr/lib from QT_LFLAGS_PSQL and QT_LFLAGS_MYSQL.@
I use QtCreator and I connot localize mkspecs/qmodule.pri
Is there anyone who don't receive such error?
My colleagues do receive it on Windows and on Linux 32 and 64bit. That's why I don't understand why there is no even notice (in documentation) about such error can appear and why. Maybe it's because we are all from Poland... :/
pol102 last edited by
It is forum, it means that you have to wait. We are one. We have a lot of personal things to do so wait for answer more than 16 hours.