undefined reference to qt_static _plugin
-
@NIXIN Sorry, my post was wrong.
"Link your application with your plugin library using LIBS in the .pro file." - so, using LIBS is correct. But you're using it wrongly, it should be:LIBS += -L"/home/uidm9805/Qt Projects/static_plugin_qmake/build/plugin_qmake" -lplugin_qmake
Better to use relative paths, see http://doc.qt.io/qt-5/qtwidgets-tools-plugandpaint-app-example.html
-
@jsulm I tried using LIBS += the way you suggested, however still it is not working...
getting same errors again@NIXIN Can you show your LIBS line from your pro file?
-
wrote on 3 Jan 2019, 12:16 last edited by
TEMPLATE = app QT += widgets HEADERS = interface.h SOURCES += main.cpp #LIBS += "/home/uidm9805/Qt Projects/static_plugin_qmake/build/plugin_qmake/libplugin_qmake.a" LIBS += -L"/home/uidm9805/Qt Projects/static_plugin_qmake/build/plugin_qmake" -lplugin_qmake
-
TEMPLATE = app QT += widgets HEADERS = interface.h SOURCES += main.cpp #LIBS += "/home/uidm9805/Qt Projects/static_plugin_qmake/build/plugin_qmake/libplugin_qmake.a" LIBS += -L"/home/uidm9805/Qt Projects/static_plugin_qmake/build/plugin_qmake" -lplugin_qmake
@NIXIN You should check the linker call as you have a space in your path which can cause issues (you should avoid spaces in paths).
-
@NIXIN You should check the linker call as you have a space in your path which can cause issues (you should avoid spaces in paths).
wrote on 3 Jan 2019, 12:21 last edited by@jsulm I tried same thing with this example http://doc.qt.io/qt-5/qtwidgets-tools-plugandpaint-app-example.html and its working fine there
LIBS += "/home/uidm9805/Qt Projects/plugandpaint/build/plugandpaint/plugins/libpnp_basictools.a"
don't know why this project is behaving in odd manner
-
@jsulm I tried same thing with this example http://doc.qt.io/qt-5/qtwidgets-tools-plugandpaint-app-example.html and its working fine there
LIBS += "/home/uidm9805/Qt Projects/plugandpaint/build/plugandpaint/plugins/libpnp_basictools.a"
don't know why this project is behaving in odd manner
@NIXIN Is your plug-in really located here: /home/uidm9805/Qt Projects/static_plugin_qmake/build/plugin_qmake? And was it build with exact same compiler and Qt version?
-
@NIXIN Is your plug-in really located here: /home/uidm9805/Qt Projects/static_plugin_qmake/build/plugin_qmake? And was it build with exact same compiler and Qt version?
-
wrote on 4 Jan 2019, 09:52 last edited by
can anybody help me with this issue??
-
wrote on 4 Jan 2019, 10:50 last edited by
After lot of hit and trial, I got the mistake I was doing
Q_IMPORT_PLUGIN(plugin_qmake)
this line should have the class name of plugin
Q_IMPORT_PLUGIN(PluginQmake)
now it works fine....
-
wrote on 4 Jan 2019, 15:09 last edited by
If it's solved, Please set it to "Solved" from unsolved.
14/14