[Qt-interest] Splitting library?

Anatoly Burakov burakov.anatoly at googlemail.com
Thu Feb 11 14:48:54 CET 2010


Oliver.Knoll at comit.ch wrote:
> AngelWarrior wrote on Wednesday, February 10, 2010 8:55 PM:
>
>   
>> See a library contains the implmentation code that is linked at the
>> end of the compilation during the linking stage.
>>     
>
> I have attached a simple example which I did for the discussion "Q_OBJECT in DLL - Release build warnings". It consists of a simple dynamic library "Foo" which emits a signal and an executable "Bar" which uses "Foo".
>
> It also shows how to easily "export" symbols (relevant for the Visual Studio MS compiler, this __declspec(dllexport) stuff...) in a "platform-independent" manner (well, easy...) using the Q_EXPORT macro.
>
> And off course it also shows how to properly link with that libary:
>
>   // in Bar.pro
>   LIBS += -L$$DESTDIR -lFoo
>
> Refer to http://doc.trolltech.com/4.6/qmake-variable-reference.html#libs
>
> Cheers, Oliver
Thanks for that, all works beatifully!

However, i've been exploring deeper into direct modification of *.pro 
files and i have some other questions. First, when i create subdir-based 
projects i can't really specify project dependencies from within the 
GUI, so i assume i must specify them somewhere else. I didn't find a 
keyword in the *.pro files for that so it must be somewhere else - 
where? Also, are there any advantages/disadvantages of using multiple 
project files vs one project with lots of subprojects? So far i see only 
that i am unable to selectively compile a subproject and can't specify 
dependencies.

Best regards,
Anatoly
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5238 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100211/b9fab5af/attachment.bin 


More information about the Qt-interest-old mailing list