[Qt-interest] dll problem
Jeroen Wijnhout
jeroen.wijnhout at gmail.com
Mon Dec 15 15:09:38 CET 2008
On Thu, Dec 11, 2008 at 11:00 AM, <Oliver.Knoll at comit.ch> wrote:
> Evan Teran wrote on Monday, December 08, 2008 9:15 PM:
>
>> Actually, my problem isn't lack of compilation. It's runtime crashes
>> that don't occur on my linux builds.
>>
>> I actually need to do the opposite of your suggestion to, because
>> some of my plugins use objects which are provided by my core
>> application.
>
> That's "broken by design", also on Linux (in fact, this broken design has nothing to do with any OS, is a
>"platform-independent broken-by-design" :)
Broken or not, the people from the linux linker thought it was
important enough to support. From the ld man page:
-E
--export-dynamic
When creating a dynamically linked executable, add all symbols to
the dynamic symbol table. The dynamic symbol table is the set of
symbols which are visible from dynamic objects at run time.
If you do not use this option, the dynamic symbol table will nor-
mally contain only those symbols which are referenced by some
dynamic object mentioned in the link.
If you use "dlopen" to load a dynamic object which needs to refer
back to the symbols defined by the program, rather than some other
dynamic object, then you will probably need to use this option when
linking the program itself.
You can also use the version script to control what symbols should
be added to the dynamic symbol table if the output format supports
it. See the description of --version-script in VERSION.
Note that executables are technically very similar to shared libraries
(in terms of what the linker does to the file after loading).
best,
Jeroen
More information about the Qt-interest-old
mailing list