CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
山寨机中的战斗机! 程序优化工程师到底对IT界有没有贡献
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  VC/MFC >  进程/线程/DLL

在MFC扩展DLL中使用luabind碰到的链接错误

楼主domustdohz(迷茫)2005-02-04 11:11:42 在 VC/MFC / 进程/线程/DLL 提问

在MFC扩展DLL中使用luabind碰到的链接错误  
  msvcprtd.lib(MSVCP71D.dll)   :   error   LNK2005:   "public:   __thiscall   std::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >::~basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >(void)"   (??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ)   已经在   luabind.lib(open.obj)   中定义  
  msvcprtd.lib(MSVCP71D.dll)   :   error   LNK2005:   "public:   __thiscall   std::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >(void)"   (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ)   已经在   luabind.lib(class_rep.obj)   中定义  
  。。。  
  LIBC.lib(crt0dat.obj)   :   error   LNK2005:   _exit   已经在   msvcrtd.lib(MSVCR71D.dll)   中定义  
  LIBC.lib(crt0init.obj)   :   error   LNK2005:   ___xc_z   已经在   msvcrtd.lib(cinitexe.obj)   中定义  
  LIBC.lib(crt0init.obj)   :   error   LNK2005:   ___xc_a   已经在   msvcrtd.lib(cinitexe.obj)   中定义  
  LIBC.lib(crt0init.obj)   :   error   LNK2005:   ___xi_z   已经在   msvcrtd.lib(cinitexe.obj)   中定义  
  LIBC.lib(crt0init.obj)   :   error   LNK2005:   ___xi_a   已经在   msvcrtd.lib(cinitexe.obj)   中定义  
  msvcprtd.lib(MSVCP71D.dll)   :   warning   LNK4006:   "public:   __thiscall   std::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >::~basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >(void)"   (??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ)   已在   luabind.lib(open.obj)   中定义;已忽略第二个定义  
  msvcprtd.lib(MSVCP71D.dll)   :   warning   LNK4006:   "public:   __thiscall   std::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >(char   const   *)"   (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z)   已在   luabind.lib(open.obj)   中定义;已忽略第二个定义  
  msvcprtd.lib(MSVCP71D.dll)   :   warning   LNK4006:   "public:   class   std::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >   &   __thiscall   std::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >::operator+=(class   std::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >   const   &)"   (??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z)   已在   luabind.lib(class_rep.obj)   中定义;已忽略第二个定义  
  msvcprtd.lib(MSVCP71D.dll)   :   warning   LNK4006:   "public:   class   std::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >   &   __thiscall   std::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >::operator+=(char   const   *)"   (??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z)   已在   luabind.lib(class_rep.obj)   中定义;已忽略第二个定义  
  msvcprtd.lib(MSVCP71D.dll)   :   warning   LNK4006:   "public:   unsigned   int   __thiscall   std::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >::max_size(void)const   "   (?max_size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ)   已在   luabind.lib(open.obj)   中定义;已忽略第二个定义  
  msvcprtd.lib(MSVCP71D.dll)   :   warning   LNK4006:   "public:   unsigned   int   __thiscall   std::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >::size(void)const   "   (?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ)   已在   luabind.lib(open.obj)   中定义;已忽略第二个定义  
  msvcprtd.lib(MSVCP71D.dll)   :   warning   LNK4006:   "public:   __thiscall   std::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >(void)"   (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ)   已在   luabind.lib(class_rep.obj)   中定义;已忽略第二个定义  
  LIBC.lib(crt0dat.obj)   :   warning   LNK4006:   _exit   已在   msvcrtd.lib(MSVCR71D.dll)   中定义;已忽略第二个定义  
  LIBC.lib(crt0init.obj)   :   warning   LNK4006:   ___xc_z   已在   msvcrtd.lib(cinitexe.obj)   中定义;已忽略第二个定义  
  LIBC.lib(crt0init.obj)   :   warning   LNK4006:   ___xc_a   已在   msvcrtd.lib(cinitexe.obj)   中定义;已忽略第二个定义  
  LIBC.lib(crt0init.obj)   :   warning   LNK4006:   ___xi_z   已在   msvcrtd.lib(cinitexe.obj)   中定义;已忽略第二个定义  
  LIBC.lib(crt0init.obj)   :   warning   LNK4006:   ___xi_a   已在   msvcrtd.lib(cinitexe.obj)   中定义;已忽略第二个定义  
   
  ====================================  
  郁闷死了~~试了好多方法都不行。 问题点数:100、回复次数:7Top

1 楼domustdohz(迷茫)回复于 2005-02-04 11:34:38 得分 0

顶~~~~  
  是不是都回家过年了~~怎么没人回应阿??Top

2 楼domustdohz(迷茫)回复于 2005-02-04 12:39:18 得分 0

各位大虾,给点意见阿~~郁闷Top

3 楼DentistryDoctor(Data Recovery -- http://www.powerdatarecovery.com)回复于 2005-02-04 13:14:48 得分 100

如果可以,将程序发给我。  
  你的问题大致是.lib冲突。Top

4 楼domustdohz(迷茫)回复于 2005-02-04 13:44:56 得分 0

呵呵,不好意思,程序是不可以发了!我也知道是.lib冲突。不过,它他用到的库关系比较复杂.  
  msvcprtd.lib(MSVCP71D.dll),msvcrtd.lib,LIBC.lib,luabind.libTop

5 楼DentistryDoctor(Data Recovery -- http://www.powerdatarecovery.com)回复于 2005-02-04 13:48:17 得分 0

忽略掉libc.lib.Top

6 楼domustdohz(迷茫)回复于 2005-02-04 13:55:08 得分 0

同时会出现其他的一大堆  
  msvcprtd.lib(MSVCP71D.dll)   :   error   LNK2005:   "public:   __thiscall   std::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >::~basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >(void)"   (??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ)   已经在   luabind.lib(open.obj)   中定义  
  msvcprtd.lib(MSVCP71D.dll)   :   error   LNK2005:   "public:   unsigned   int   __thiscall   std::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >::size(void)const   "   (?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ)   已经在   luabind.lib(open.obj)   中定义  
  msvcprtd.lib(MSVCP71D.dll)   :   error   LNK2005:   "public:   __thiscall   std::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >(void)"   (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ)   已经在   luabind.lib(class_rep.obj)   中定义  
  msvcprtd.lib(MSVCP71D.dll)   :   warning   LNK4006:   "public:   __thiscall   std::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >::~basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >(void)"   (??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ)   已在   luabind.lib(open.obj)   中定义;已忽略第二个定义  
  msvcprtd.lib(MSVCP71D.dll)   :   warning   LNK4006:   "public:   __thiscall   std::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >(char   const   *)"   (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z)   已在   luabind.lib(open.obj)   中定义;已忽略第二个定义  
  msvcprtd.lib(MSVCP71D.dll)   :   warning   LNK4006:   "public:   __thiscall   std::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >(class   std::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >   const   &)"   (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z)   已在   luabind.lib(open.obj)   中定义;已忽略第二个定义  
  msvcprtd.lib(MSVCP71D.dll)   :   warning   LNK4006:   "public:   char   const   *   __thiscall   std::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >::c_str(void)const   "   (?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ)   已在   luabind.lib(class_rep.obj)   中定义;已忽略第二个定义  
  msvcprtd.lib(MSVCP71D.dll)   :   warning   LNK4006:   "public:   class   std::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >   &   __thiscall   std::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >::operator+=(class   std::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >   const   &)"   (??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z)   已在   luabind.lib(class_rep.obj)   中定义;已忽略第二个定义  
  msvcprtd.lib(MSVCP71D.dll)   :   warning   LNK4006:   "public:   class   std::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >   &   __thiscall   std::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >::operator+=(char   const   *)"   (??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z)   已在   luabind.lib(class_rep.obj)   中定义;已忽略第二个定义  
  msvcprtd.lib(MSVCP71D.dll)   :   warning   LNK4006:   "public:   unsigned   int   __thiscall   std::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >::max_size(void)const   "   (?max_size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ)   已在   luabind.lib(open.obj)   中定义;已忽略第二个定义  
  msvcprtd.lib(MSVCP71D.dll)   :   warning   LNK4006:   "public:   class   std::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >   &   __thiscall   std::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >::erase(unsigned   int,unsigned   int)"   (?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@II@Z)   已在   luabind.lib(open.obj)   中定义;已忽略第二个定义  
  msvcprtd.lib(MSVCP71D.dll)   :   warning   LNK4006:   "public:   unsigned   int   __thiscall   std::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >::size(void)const   "   (?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ)   已在   luabind.lib(open.obj)   中定义;已忽略第二个定义  
  msvcprtd.lib(MSVCP71D.dll)   :   warning   LNK4006:   "public:   __thiscall   std::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >::basic_string<char,struct   std::char_traits<char>,class   std::allocator<char>   >(void)"   (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ)   已在   luabind.lib(class_rep.obj)   中定义;已忽略第二个定义  
        正在创建库   Debug/AutoTrade.lib   和对象   Debug/AutoTrade.exp  
  luabind.lib(lbaselib.obj)   :   error   LNK2001:   无法解析的外部符号   __pctype  
  luabind.lib(lauxlib.obj)   :   error   LNK2001:   无法解析的外部符号   __pctype  
  luabind.lib(llex.obj)   :   error   LNK2001:   无法解析的外部符号   __pctype  
  luabind.lib(lobject.obj)   :   error   LNK2001:   无法解析的外部符号   __pctype  
  luabind.lib(lbaselib.obj)   :   error   LNK2001:   无法解析的外部符号   ___mb_cur_max  
  luabind.lib(lauxlib.obj)   :   error   LNK2001:   无法解析的外部符号   ___mb_cur_max  
  luabind.lib(llex.obj)   :   error   LNK2001:   无法解析的外部符号   ___mb_cur_max  
  luabind.lib(lobject.obj)   :   error   LNK2019:   无法解析的外部符号   ___mb_cur_max   ,该符号在函数   _luaO_chunkid   中被引用  
  luabind.lib(lauxlib.obj)   :   error   LNK2001:   无法解析的外部符号   _errno  
  ../bin/AutoTrade.dll   :   fatal   error   LNK1120:   3   个无法解析的外部命令  
   
  最后这些是新增加的Top

7 楼domustdohz(迷茫)回复于 2005-02-05 16:59:27 得分 0

问题已经解决,有点龌龊的方法.sigh~~~  
  将lua以及luabind的库文件都“用在共享   DLL   中使用   MFC”选项重新编译链接了一遍。  
  呵呵,开源的东西就是好啊,想怎么编译链接就怎么编译链接。  
  (期间用/MT选项试了试,编译完成后还是有冲突。)  
  ~~~~~~~~~~~~  
  结贴Top

相关问题

  • 扩展MFC DLL
  • MFC扩展DLL的难题,难啊!!!
  • ?????一个MFC扩展DLL中的输出函数的问题????
  • VB能调用用VC写的MFC扩展DLL吗?
  • 关于在MFC扩展DLL中使用资源的问题!
  • 请问:在ATL中能不能使用MFC扩展dll?
  • 菜鸟系列:关于MFC扩展DLL的一些疑问……
  • 不知道MFC扩展DLL的能不能显示导出?
  • 请教MFC扩展DLL的问题,关于内存泄的
  • MFC扩展DLL的类导出难题,在线恭候!

关键词

  • basic
  • dll
  • luabind
  • std
  • msvcprtd
  • msvcp71
  • allocator
  • msvcrtd
  • 中定义
  • cinitexe

得分解答快速导航

  • 帖主:domustdohz
  • DentistryDoctor

相关链接

  • Visual C++类图书
  • Visual C++类源码下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
北京创新乐知广告有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
Copyright © 2000-2008, CSDN.NET, All Rights Reserved
GongshangLogo