Am 21.01.2012 um 15:06 schrieb Karl Krach <mailingli...@bluespirit.la>:

> "Static member variables are initialized before the 'real program'
> (main()) starts" - right? 

IIRC when it comes to static variables defined in shared libraries: "It 
depends" - on the compiler/platform being used.

I think that was also the main reason why one should call "qInitResources" (a 
global function or a macro, can't remember) as soon as possible in the main 
function, to make sure that embedded data ("Qt resource compiler") defined in 
shared libs is really initialised.

Again, it might work with one compiler (I think with MSVC it does when 
embedding data into DLLs) without calling qInitResources, but might fail with 
another (probably older) compiler.


Cheers, Oliver

p.s. Btw the last time I asked a question in the c++ comp group (really years 
ago) related to "shared libs" I was told: "That's not part of the C++ standard, 
dude - go read the man pages of your compiler/linker!" ;)
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to