[Development] Regular expression libraries for QRegExp

Thiago Macieira thiago at kde.org
Wed Nov 23 15:45:54 CET 2011


On Wednesday, 23 de November de 2011 08:33:35 Craig.Scott at csiro.au wrote:
> I don't think you need to install these static libraries (although it won't
> do any harm if you do). The main need is for Qt to use it internally, not
> to expose anything from it through its API. That makes the use of PCRE (or
> any of the other support libraries being used in a similar way) an internal
> implementation detail.

If qtsupport and qtbase are different repositories, then you need to install 
from one so that the other may find it. But you need not deploy the static 
libraries to your device, final installation of Qt, or along with your program.

No Linux distribution should be affected, since those support libraries are 
already present in their systems.

> I'm probably having a pre-coffee moment, but you lost me on the "whole
> archive linkage" bit. ;)

gcc -o libfoo.so -shared foo1.o libstatic.a

That does *not* link properly. First, you need to add -Wl,--no-undefined, which 
we already do. That might be enough, since we everything we need from 
libstatic.a is carried in from symbol dependencies (from foo1.o).

If that does not work, we need 
	-Wl,--whole-archive libstatic.a -Wl,--no-whole-archive

That will cause all .o contained in the static archive to be linked into the 
final binary (the ELF shared library), regardless of whether they were required 
by symbol dependencies. This is mostly needed if the static archive contains 
API.

I have no clue how or even *if* that works with non-GNU linkers. Someone needs 
to test Mac OS X's linker and MSVC, at minimum, and hopefully check also 
Solaris's and AIX's.

Finally, note that compiling Qt in static mode will require a different code 
path. Since there's no actual linking involved, the .o contained in lbstatic.a 
need to be extracted and then re-added into libfoo.a.

Hence the "I'm not volunteering" part.

-- 
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: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20111123/3478fd77/attachment.sig>


More information about the Development mailing list