On Tuesday 13 August 2013 13:57:48 Thomas Lübking wrote:
> On Dienstag, 13. August 2013 12:39:58 CEST, Jan Kundrát wrote:
> > - it works only on GCC
> 
> Semi, see my other mail.
> 
> > - the linker flags one needs could be considered hackish
> 
> Yesno.
> It's used to wrap static archives into shared objects, esp.
> when using them for toolkits. It's (afaics) rather uncommon
> when linking executables, though.
> 

This is similar. Common plugin code is compiled into static 
library libPlugins.a. This library has exported some symbols 
(with Q_DECL_EXPORT) and all exported symbols must be included 
into trojita executable. So in this case trojita executable 
exporting symbols to other libraries - like shared objects.

> > - Trojita already links against a myriad of shared libraries
> 
> Note to Oxford dictionary: the new definition of "myriad"
> shall be "54" ;-) Back to serious, i think Pali wants to
> compile a statically linked trojita blob (so you've one
> executable file that you can pass around) - probably only
> interesting for windows (if at all) though.
> 

Yes, on windows it is common that administrator can decide where 
will install application. And also it is common that he will not 
decide at compile time :-) And some users prefer "portable" 
version of applications which are stored on removable usb storage 
and working on more machins. So application directory depends on 
lot of other factors.

This is also possible to have on linux machines. You know that 
machine has shared libraries of Qt4.8 stored in place where 
dynamic loader can find them.

So for portable versions is one big (or smaller with dependency 
on system Qt libraries) executable good.

> >> No. Runtime loading should work too (at least with GCC).
> >> For GNU compiler/linker is needed special flag, but this
> >> is added by cmake when using GNU.
> 
> Err... ok. Reading that again: do you actually use
> -whole-archive to ensure the statically linked symbols get
> implicit precedence over the one of a coflicting dlopened
> plugin /only/? I'll compile that static linked stuff tonight
> to try to understand what struggled you.
> 
> Cheers,
> Thomas

There are no conflicts! Static linked stuff is only in trojita 
executable. Plugins do not have it.

-- 
Pali Rohár
pali.ro...@gmail.com

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to