Re: libsoup on MS Windows problems



> Output from pexports bsoup-2.4-1.dll is attached as pexports.txt
> Output from nm libsoup-2.4-1.dll.a is attached as nm.txt

Whoa, those are huge, and my mail client (Gmail) unfortunately decided
to show them in-line;) It would have been enough to include just short
representative excerpts.

Anyway, clearly it is libxml2's functions that get exported instead of
what should be exported.

libxml2 is a library that explicitly decorates the functions it
exports in its header files. Note the XMLPUBFUN macro, defined in
xmlexports.h, which expands to different things depending on whether
on Win32 or not, whether building or using libxml2, and whether
libxml2 is being built / was built as a DLL or static library.

There are differing opinions whether such explicit export/import
decorations in header files is a good or bad policy. It is easy for
things to go badly wrong unless one is careful.

Maybe you build libxml2 yourself but thanks to libtool's
over-protective sillyness you got a static library even though you
intended to build a shared library, but the libxml2 code was compiled
intending to go into a DLL and thus you get export directives for the
libxml2 functions in the libxml2 static library.

When the GNU linker sees that the object code being built into a DLL
contains at least one export directive, it uses just those export
directives to construct the list of exports, instead of exporting all
global symbols.

The link command line has just -lxml2 so from that it's impossible to
say if my guess is right.

--tml


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]