- assigned_to: nobody --> t1mpy
The .def file for the Win32 dll uses the LIBRARY directive
to name the dll as 'id3lib'.
Such directive causes the linker to write the name you
specify into the .exp file, which is used to import the
library by the caller.
But this way, changing the output name for the dll into
the VC++ project (for example id3lib.dll for release
version and id3lib.d.dll for debug version), conflicts with
the .def directive, so using something as follow:
#ifdef _DEBUG
#pragma comment(lib,"id3lib.d.lib")
#pragma message("\t\t\t"__FILE__"("STR(__LINE__)"):
automatically linking
with the id3lib.d.dll")
#else
#pragma comment(lib,"id3lib.lib")
#pragma message("\t\t\t"__FILE__"("STR(__LINE__)"):
automatically linking
with the id3lib.dll")
#endif
has no effect, because the linker always uses the name
specifyed into the .exp file (generated from the .def
definitions). The result is that the caller always looks for
the id3lib.dll, also with the debug version of the caller.
Putting out the LIBRARY directive from the .def file
solves the trouble.
lpiergentili@yahoo.com