[Qt-interest] Build problem when using QtSingleApplication solution
Marcus Williams
marcus-qt at quintic.co.uk
Tue Nov 17 17:58:31 CET 2009
Hi -
I'm trying to use the QtSingleApplication - I can build the component
and its examples. The examples work.
However... if I try to use it in a qt application that extends
QApplication (so we have a MyApp class that extends QApplication) I get
the following build error when we change it to extending
QtSingleApplication:
1>moc_MyApp.obj : error LNK2001: unresolved external symbol "public:
static struct QMetaObject const QtSingleApplication::staticMetaObject"
(?staticMetaObject at QtSingleApplication@@2UQMetaObject@@B)
1>D:\Projects\hii-testtrunk\MVS\VS2008\MVS\Debug\MVS.exe : fatal error
LNK1120: 1 unresolved externals
I can solve this by building the singleapplications moc file
(moc_qtsingleapplication.cpp) as part of our project, but I'm not sure
this is what I should be doing as this doesnt seem necessary in the
example code. I have built the QtSingleApplication as a dll, and I have
linked against the QtSingleApplication lib file during the link step for
building MyApp.
So a few questions: should this be necessary? and is the LGPL
"triggered" by building the moc file into our code or is this covered by
the LGPL exception distributed with the QtSingleApplication solution?
Thanks
Marcus
More information about the Qt-interest-old
mailing list