[Qt-interest] Build problem when using QtSingleApplication solution

Marcus Williams marcus-qt at quintic.co.uk
Wed Nov 18 11:12:51 CET 2009


Ross Driedger wrote:
>> 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.
>
> Providec the .pri is referred to in your .pro, qmake should put the
> necessary references to the files into the Makefiles.  What version are
> you running?  I'm using 4.5.1 on windows and 4.5.2 on Mac/*NIX (both
> commercial) with no problems.

Thats what I thought - unfortunately we're building our app inside 
Visual Studio so we're not using the makefiles or pri/pro files I think.

>> I have built the QtSingleApplication as a dll, and I have
>> linked against the QtSingleApplication lib file during the link step for
>> building MyApp.
>
> I'm a bit confused.  You are using the solution as part of a DLL?  Isn't
> the point of a DLL to serve a number of different possible applications
> and application instances?

Its only being built as a dll to solve the LGPL problem - we cant 
statically link against it or include the code inside our codebase 
without violating the LGPL (which is why I raised the question about the 
moc file).

Thanks for you help,

Marcus




More information about the Qt-interest-old mailing list