PDA

View Full Version : Consequence of 'config += QT_PLUGIN '



mrstephengross
7th May 2008, 22:12
We have a QT4.4-based application in which we develop our own plugins. Following Qt's instructions, we have added:

config += plugin

To our plugin libraries. This has worked fine.

However, we are transitioning to a non qmake-based system, and consequently I need to better understand the build semantics of plugins.

As far as I can tell, the only compile-time effect of 'config += plugin' is to define QT_PLUGIN (as in, 'g++ -DQT_PLUGIN ...'). Also, executables using plugins are not linked to those plugins.

Have I correctly understood the mechanics of 'config += plugin' ? Are there other compile-time or link-time effects that I should know about?

Thanks,
--Steve

wysota
7th May 2008, 23:39
According to the "qt.prf" features file:


plugin { #Qt plugins
static:DEFINES += QT_STATICPLUGIN
DEFINES += QT_PLUGIN
}

mrstephengross
8th May 2008, 15:00
Thanks a lot!

fengy
9th May 2008, 00:03
Hi, I have also been trying to construct a non-qmake makefile for a Qt plugin by adding -DQT_PLUGIN. But so far it does not seem to work either.

I am not an expert on Qt and this qt.prf does not offer too much clue for me. Steve, would you mind explaining in more details?

Thanks in advance!