[vorbis-dev] Vorbisfile Linker Question

Dimitry Andric dim at xs4all.nl
Thu Feb 7 12:30:38 PST 2002



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2/7/2002 at 21:11:34 Segher Boessenkool wrote:

>> LINK : warning LNK4098: defaultlib "MSVCRTD" conflicts with use of
>> other libs; use /NODEFAULTLIB:library

SB> It tells you exactly what the problem is, and how to solve it...
SB> What's the problem?

Contrary to what Microsoft Link tells us here, it is NOT very wise to
use the /NODEFAULTLIB option. These warnings are generated when you
try to link together object files that have been compiled with
_different_ "code generation" settings. In this case, Marc has
generated some object files with the "Multithreaded DLL" code
generation option set, and some other object files with the
"Multithreaded" option set.

If you tell the linker to shut up and ignore the warnings, you will
end up with an executable that has undefined behaviour. For example,
strange things can happen if one piece of code calls the MSVCRT.DLL
(multithreaded DLL) version of malloc(), and another piece of code
calls the LIBCMT.LIB (multithreaded "static") version of free()?

Solution: rebuild everything, including the .LIB files with one, and
only one, code generation setting. And be sure to never ignore linker
warnings. :)

Cheers,
- --
Dimitry Andric <dim at xs4all.nl>
PGP Key: http://www.xs4all.nl/~dim/dim.asc
Fingerprint: 7AB462D2CE35FC6D42394FCDB05EA30A2E2096A3
Lbh ner abj va ivbyngvba bs gur QZPN

-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5i
Comment: http://www.gn.apc.org/duncan/stoa_cover.htm

iQA/AwUBPGLV4rBeowouIJajEQLeXQCgnyCtdTCefjBHn0aGPgVN/vuwWOUAnjHC
YbdrQbbWPf3u4Pi1tK3SaNdN
=CJya
-----END PGP SIGNATURE-----

<p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis-dev mailing list