error LNK2005: __alloc_osfhnd already defined in LIBCD.lib(osfinfo.obj) 等错误

 
<script type="text/javascript">function StorePage(){d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.365key.com/storeit.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'keyit','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));keyit.focus();}</script>
<script src="http://wz.csdn.net/javascripts/vote.js" type="text/javascript"></script> style="MARGIN-TOP: 0px; FLOAT: left" border="0" marginwidth="0" framespacing="0" marginheight="0" src="http://wz.csdn.net/vote.aspx?t=error%20LNK2005%3A%20__alloc_osfhnd%20already%20defined%20in%20LIBCD.lib%28osfinfo.obj%29%20%u7B49%u9519%u8BEF%20-%20%u6BCF%u5929%u8FDB%u6B651%25%uFF0C%u4ECE%u4E2D%u627E%u5230%u5FEB%u4E50%uFF01%20-%20CSDNBlog&u=http%3A//blog.csdn.net/gengxt2003/archive/2007/06/07/1641855.aspx" frameborder="0" noresize="noresize" width="54" scrolling="no" height="75">  error LNK2005: __alloc_osfhnd already defined in LIBCD.lib(osfinfo.obj) 等错误   <script src="http://blog.csdn.net/count.aspx?ID=1641855&Type=Rank" type="text/javascript"></script>    CSDN Blog推出文章指数概念,文章指数是对Blog文章综合评分后推算出的,综合评分项分别是该文章的点击量,回复次数,被网摘收录数量,文章长度和文章类型;满分100,每月更新一次。

LIBCMT.lib(osfinfo.obj) : error LNK2005: __alloc_osfhnd already defined in LIBCD.lib(osfinfo.obj)
LIBCMT.lib(osfinfo.obj) : error LNK2005: __set_osfhnd already defined in LIBCD.lib(osfinfo.obj)
LIBCMT.lib(osfinfo.obj) : error LNK2005: __free_osfhnd already defined in LIBCD.lib(osfinfo.obj)
LIBCMT.lib(osfinfo.obj) : error LNK2005: __get_osfhandle already defined in LIBCD.lib(osfinfo.obj)
LIBCMT.lib(osfinfo.obj) : error LNK2005: __open_osfhandle already defined in LIBCD.lib(osfinfo.obj)
LIBCMT.lib(dosmap.obj) : error LNK2005: __dosmaperr already defined in LIBCD.lib(dosmap.obj)
LINK : warning LNK4098: defaultlib "LIBCMT" conflicts with use of other libs; use /NODEFAULTLIB:library
Debug/TEST2.exe : fatal error LNK1169: one or more multiply defined symbols found

 

程序非常简单,只是一个Console下面的cout 命令

代码如下:

#include <stdlib.h>
#include <iostream.h>

void main(void)
{

cout << "adsfasdfasdf" << endl;
}

、出现上面的错误, 

我的解决办法是在编译选项里面 加个 /MT 选项即可,说明使用了多线程的库


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值