Hi Boris,

> Do you know if in this case all symbols will be exported (as is done
> in Xerces-C++ right now) or import/export declarations should be
> used?

MINGW supports __declspec(dllexport) and __declspec(dllimport) or by
default, exports all symbols when -shared is used.  If you export all
symbols, MINGW's gcc allows you to link directly to the built DLL and
will "auto-import" the symbols.

If you use explicit exports/imports you can have g++ create an import
library when linking.  A highly simplified command line would then look
like this:

(-mthreads includes multi-thread support, -shared says we're building a
DLL)
g++ -mthreads -shared $(LIBDIRS) $(LIBS) $(OBJECTS) -o libblah.dll
-Wl,--out-implib,libblah.a

> Also, I wonder why Xerces-C++ exports all symbols on Mingw even if
> the appropriate declarations are present (see the Mingw sections in
> util/Compilers/GCCDefs.hpp).

I can't find that file in the sources I checked out?

- Dave



Reply via email to