VC++ build, DLLs, & Module Definition File (.DEF)

Bob Friesenhahn <[email protected]>
Newsgroups gmane.comp.video.graphicsmagick.core
Message-ID <Pine.GSO.4.44.0401111821560.29988-100000@scooby.simplesystems.org>
Some time ago I manually hacked the libxml sources to do manual symbol
exports.  This is evil since it is then very difficult to upgrade
libxml.  Since we have a .DEF file for libxml, I assumed that it was
safe to back out my hacks, so the hacks have now been removed.
Apparently I guessed wrong.  DLL builds are now broken in
GraphicsMagick CVS as a result.

While it is necessary for the .DEF file to be listed with the library
sources (which it is), it is also necessary for a separate Module
Definition File to be defined in the library property pages so that a
/DEF: option is passed to the linker. Otherwise the .DEF file is not
used when linking the library.  VisualMagick's configure will need to
be updated to know about this.

In the mean time, I find that setting the parameter

"Linker" --> "Input" --> "Module Definition File" to
"..\..\libxml\libxml2.def" in the CORE_libxml Property Pages

causes DLL linkage to succeed.

Bob
======================================
Bob Friesenhahn
[email protected]
http://www.simplesystems.org/users/bfriesen



-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.