Chinaunix首页 | 论坛 | 博客
  • 博客访问: 773091
  • 博文数量: 217
  • 博客积分: 2401
  • 博客等级: 大尉
  • 技术积分: 2030
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-16 06:58
个人简介

怎么介绍?

文章分类

全部博文(217)

文章存档

2023年(2)

2022年(3)

2021年(29)

2020年(12)

2019年(5)

2018年(5)

2017年(5)

2016年(3)

2015年(6)

2014年(12)

2013年(16)

2012年(9)

2011年(6)

2010年(15)

2009年(30)

2008年(59)

我的朋友

分类:

2008-11-26 04:22:49

defaultlib   'library'   conflicts   with   use   of   other   libs;   use   /NODEFAULTLIB:library  
   
  You   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
阅读(986) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~