[Qt-interest] Splitting library?
Oliver.Knoll at comit.ch
Oliver.Knoll at comit.ch
Thu Feb 11 09:35:54 CET 2010
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
--
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FooBar.zip
Type: application/x-zip-compressed
Size: 6587 bytes
Desc: FooBar.zip
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100211/2b494ad9/attachment.bin
More information about the Qt-interest-old
mailing list