[Qt-interest] how to use static library instead of dll library

Thiago Macieira thiago at kde.org
Fri Oct 28 09:36:52 CEST 2011


On Friday, 28 de October de 2011 01:35:21 Vincent Cai wrote:
>          My question is how to config the application project to use static
> library or dll library?

That depends on your compiler. If you're using gcc with a Unix ld, you can use 
the command line:

	gcc [other options] -ldynamiclib1 -ldynlib2 -static -lstaticlib1 -dynamic

Another and more sure way is to list the exact file path, including the 
extension, instead of using -L and -l.

My recommendation is to use different paths, such that both types of build are 
never visible at the same time.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20111028/cfd694c4/attachment.bin 


More information about the Qt-interest-old mailing list