加入htmlHelp.lib及包含htmlhelp.h文件就出现LINK : warning LNK4098: defaultlib "LIBCMT" conflicts with use of other libs; use /NOD 在我的工程中加入htmlHelp.lib及包含htmlhelp.h文件就出现LINK : warning LNK4098: defaultlib "LIBCMT" conflicts with use of other libs; use /NODEFAULTLIB:library要如何解决?thanks 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Project-->Setting...->Link-->Project Options->add :/NODEFAULTLIB MY GOD:加了之后出现2000多个error LNK2001: unresolved external symbol!!! 不用去管它,是htmlhelp.lib和defaultlib中有命名冲突。 defaultlib 'library' conflicts with use of other libs; use /NODEFAULTLIB:libraryYou are trying to link with incompatible libraries.Note The run-time libraries now contain directives to prevent mixing different types. You will receive this warning if you try to use different types or debug and non-debug versions of the run-time library in the same program. For example, if you compiled one file to use one kind of run-time library and another file to use another kind (for example, single-threaded versus multithreaded) and tried to link them, you will get this warning. You should compile all source files to use the same run-time library. See the Use Run-Time Library (/MD, /ML, /MT, /LD) compiler options for more information.You can use the linker's /VERBOSE:LIB switch to determine which libraries the linker is searching. If you receive LNK4098 and want to create an executable file that uses, for example, the single-threaded, non-debug run-time libraries, use the /VERBOSE:LIB option to find out which libraries the linker is searching. The linker should print LIBC.lib and not LIBCMT.lib, MSVCRT.lib, LIBCD.lib, LIBCMTD.lib, or MSVCRTD.lib as the libraries searched. You can tell the linker to ignore the incorrect run-time libraries by using /NODEFAULTLIB for each library you want to ignore.The table below shows which libraries should be ignored depending on which run-time library you want to use.To use this run-time library Ignore these libraries Single-threaded (libc.lib) libcmt.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib Multithreaded (libcmt.lib) libc.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib Multithreaded using DLL (msvcrt.lib) libc.lib, libcmt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib Debug Single-threaded (libcd.lib) libc.lib, libcmt.lib, msvcrt.lib, libcmtd.lib, msvcrtd.lib Debug Multithreaded (libcmtd.lib) libc.lib, libcmt.lib, msvcrt.lib, libcd.lib, msvcrtd.lib Debug Multithreaded using DLL (msvcrtd.lib) libc.lib, libcmt.lib, msvcrt.lib, libcd.lib, libcmtd.lib For example, if you received this warning and you want to create an executable file that uses the non-debug, single-threaded version of the run-time libraries, you could use the following options with the linker:/NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:libcd.lib /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrtd.lib--------------------------------------------------------------------------------Microsoft Product Support Knowledge Base Link Send feedback on this topic to Microsoft© Microsoft Corporation. All rights reserved. 如何实现刻录DVD盘的功能? 请各位大侠帮忙看看!! 如何创建一个系统用户并且可以把他放到指定的用户组中?? 关于listbox 在线等 32位整数饱和乘的实现 问斑竹:VC非技术区的是不是一结贴就看不见了? 请教VC网络编程中的若干问题 如何把一些类打包啊? 菜鸟问题:怎样做一个crack程序? 高手进来 !如何在VC++调用CAD制图模块! 如何复制, 删除, 修改属性, 文件? 我添加了第二个toolBar,也为每个按钮设置了id和消息映射,运行后,为什么没有显示这个toolbar? CTreeCtrl的问题,请各位大虾帮忙
加了之后出现2000多个error LNK2001: unresolved external symbol!!!
You can use the linker's /VERBOSE:LIB switch to determine which libraries the linker is searching. If you receive LNK4098 and want to create an executable file that uses, for example, the single-threaded, non-debug run-time libraries, use the /VERBOSE:LIB option to find out which libraries the linker is searching. The linker should print LIBC.lib and not LIBCMT.lib, MSVCRT.lib, LIBCD.lib, LIBCMTD.lib, or MSVCRTD.lib as the libraries searched. You can tell the linker to ignore the incorrect run-time libraries by using /NODEFAULTLIB for each library you want to ignore.The table below shows which libraries should be ignored depending on which run-time library you want to use.To use this run-time library Ignore these libraries
Single-threaded (libc.lib) libcmt.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib
Multithreaded (libcmt.lib) libc.lib, msvcrt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib
Multithreaded using DLL (msvcrt.lib) libc.lib, libcmt.lib, libcd.lib, libcmtd.lib, msvcrtd.lib
Debug Single-threaded (libcd.lib) libc.lib, libcmt.lib, msvcrt.lib, libcmtd.lib, msvcrtd.lib
Debug Multithreaded (libcmtd.lib) libc.lib, libcmt.lib, msvcrt.lib, libcd.lib, msvcrtd.lib
Debug Multithreaded using DLL (msvcrtd.lib) libc.lib, libcmt.lib, msvcrt.lib, libcd.lib, libcmtd.lib For example, if you received this warning and you want to create an executable file that uses the non-debug, single-threaded version of the run-time libraries, you could use the following options with the linker:/NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:libcd.lib /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrtd.lib
--------------------------------------------------------------------------------Microsoft Product Support Knowledge Base Link Send feedback on this topic to Microsoft© Microsoft Corporation. All rights reserved.