CVS Tag: R_2_0_0
libexpat.def and libexpatw.def for Windows DLL builds both include two elements that cause link warnings and in some cases, make the DLL unuseable at runtime.
The first line of each file, the LIBRARY directive, includes an explicit library name. This effectively prevents custom builds with a different DLL name. If you attempt to build a DLL with a different name, the linker will throw LNK4070 'filename directive differs from output filename' and the import lib will cause applications to link against the DEF LIBRARY DLL name instead of the actual DLL file name, which of course causes a "DLL not found" error at runtime.
To prevent this, that line should read just 'LIBRARY' with no name specified.
The next line is a DESCRIPTION directive. This line causes a LNK4017 warning 'statement not supported'. This directive has been deprecated for years in favor of version resources, and should be eliminated completely.
Log in to post a comment.