我做的程序编译成Release版本后有以下几个提示:1。LINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:library2。LINK : warning LNK4098: defaultlib "MSVCRTD" conflicts with use of other libs; use /NODEFAULTLIB:library3。LINK : warning LNK4089: all references to "KERNEL32.dll" discarded by /OPT:REF这三个提示都是什么意思啊?1,2好象是一个问题。关键是问题2。他使我的Release版本的程序运行时还需要MSVCRTD.DLL文件支持。
而我看工程的设置里也没有调用MSVCRTD.LIB啊。
我该怎么解决这个问题。十分着急谢谢。
而我看工程的设置里也没有调用MSVCRTD.LIB啊。
我该怎么解决这个问题。十分着急谢谢。
解决方案 »
- 有没有稳定的Sokcet 通讯类
- 我想写一个查看计算机的有那些程序正上着网。和网络连接着。这要用哪方面的知识呀?
- 请问哪里有关于sdk下mdi编程的资料?
- 请教:一个关于combo box的问题。。。
- 图片框结合部分按钮播放mpeg文件,具体怎么实现呢?up有分!
- 怎样在vc中动态改变CHtmlView中的内容?急!急!!急!!!急!!!!!
- << Windows 程序设计 >> 737 页, ikowLength = ( ( cxDib * cBit + 31) & 31 ) >> 3 ; 是什么意思 ?
- MFC中怎样去掉已经添加的到工具面板中的控件。
- 一个关于网络数据包的问题,请看代码:
- 为什么我的弹出菜单只有窄窄的一条线??
- 如何用一个文档类管理多个视?
- 小问题,如何在32色下显示8色的位图,急用,马上揭贴!
如下;
project-->setting-->link页面中,在分类列表中选择Input,然后在“忽略库”这个文本框中(呵呵,我是中文版的),输入MSVCRTD.DLL,KERNEL32.DLL,LIBC.DLL就可以了。
我象你说的那样输入MSVCRTD.LIB后,编译出现下列提示信息
Linking...
LINK : warning LNK4075: ignoring /EDITANDCONTINUE due to /INCREMENTAL:NO specification
Creating library ..\Release/FlyExplore.lib and object ..\Release/FlyExplore.exp
paintlib.lib(tif_msrc.obj) : error LNK2001: unresolved external symbol __imp___CrtDbgReport
..\Release/FlyExplore.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.是不是因为我的工程里使用的 paintlib.lib 里调用MSVCRTD.LIB里的函数的问题啊。
defaultlib "library" conflicts with use of other libs; use /NODEFAULTLIB:libraryYou are trying to link with incompatible libraries.Important The run-time libraries now contain directives to prevent mixing different types. You’ll 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’ll 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 the incorrect run-time libraries by typing the incorrect libraries in the Ignore Libraries text box on the Link tab of the Settings dialog box in Developer’s Studio or by using the /NODEFAULTLIB:library option with LINK for each library you want to ignore. See the Ignore Libraries (/NODEFAULTLIB) linker option for more information.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
Generates a report with a debugging message and sends the report to three possible destinations (debug version only).int _CrtDbgReport( int reportType, const char *filename, int linenumber, const char *moduleName, const char *format [, argument] ... );Routine Required Header Compatibility
_CrtDbgReport <crtdbg.h> Win NT, Win 95
For additional compatibility information, see Compatibility in the Introduction.