ADC Home > Reference Library > Technical Q&As > QuickTime > QuickTime for Windows >

MSVC++ link error LNK4098 When Building QuickTime 3 for Windows Apps


Q: I am getting the following link errors when building a QuickTime 3 for Windows application using the Microsoft Visual C++ development environment:



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

What's going on?

A: QuickTime 3 for Windows is carefully linked with the multi-threaded version of the C runtime (LIBCMT). This can cause a conflict with your build settings. To avoid the conflict, you'll need to adjust your build settings to link with LIBCMT and recompile all your code (the runtime library is actually chosen in MSVC++ as a compile-time option, not a link-time option).

Go to the MSVC++ "Project", "Settings" dialog (ALT+F7 will work too), select the "C/C++" tab, then the "Code Generation" category. Under the popup menu for "Use run-time library", select "multi-threaded" or "multi-threaded DLL" as needed by your project. QuickTime 3 for Windows is built with "multi-threaded" selected.

If you don't use the IDE, use the C command-line option /MT.

[Sep 21 1998]


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.