error LNK2001: unresolved external symbol __afxForceEXCLUDE

小赵儿 2012-08-10 05:34:26
哪位大哥对解决链接错误比较熟悉的,小弟这里有很多的连接错误,麻烦帮帮忙
error LNK2001: unresolved external symbol __afxForceEXCLUDE
: error LNK2001: unresolved external symbol __afxForceUSRDLL
: error LNK2001: unresolved external symbol "public: __thiscall CString::CString(char const *)" (??0CString@@QAE@PBD@Z)
: error LNK2001: unresolved external symbol "public: __thiscall CString::~CString(void)" (??1CString@@QAE@XZ)
: error LNK2001: unresolved external symbol "void __cdecl operator delete(void *,char const *,int)" (??3@YAXPAXPBDH@Z)
: error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int,char const *,int)" (??2@YAPAXIPBDH@Z)
: error LNK2001: unresolved external symbol "public: __thiscall CString::CString(void)" (??0CString@@QAE@XZ)
: error LNK2001: unresolved external symbol "public: class CString const & __thiscall CString::operator=(class CString const &)" (??4CString@@QAEABV0@ABV0@@Z)
: error LNK2001: unresolved external symbol "public: virtual void __thiscall CFile::Close(void)" (?Close@CFile@@UAEXXZ)
: error LNK2001: unresolved external symbol "public: virtual __thiscall CFile::~CFile(void)" (??1CFile@@UAE@XZ)
: error LNK2001: unresolved external symbol "public: virtual int __thiscall CFile::Open(char const *,unsigned int,class CFileException *)" (?Open@CFile@@UAEHPBDIPAVCFileException@@@Z)
: error LNK2001: unresolved external symbol "public: __thiscall CString::operator char const *(void)const " (??BCString@@QBEPBDXZ)
: error LNK2001: unresolved external symbol "public: __thiscall CFile::CFile(void)" (??0CFile@@QAE@XZ)
: error LNK2001: unresolved external symbol "bool __stdcall operator!=(class CString const &,class CString const &)" (??9@YG_NABVCString@@0@Z)
: error LNK2001: unresolved external symbol "public: __thiscall CString::CString(class CString const &)" (??0CString@@QAE@ABV0@@Z)
: error LNK2001: unresolved external symbol "public: class CString const & __thiscall CString::operator=(char const *)" (??4CString@@QAEABV0@PBD@Z)
: error LNK2001: unresolved external symbol "public: void __cdecl CString::Format(char const *,...)" (?Format@CString@@QAAXPBDZZ)
这些都说什么未解决的外部符号,帮帮忙,谢谢啊
...全文
1243 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
小赵儿 2012-08-13
  • 打赏
  • 举报
回复 1
我用的是vc6.0编译过了,链接的时候出现error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in LIBCMTD.lib(new.obj)这个错。
网上的解决办法是解决方法:

强制链接器按照正确的顺序链接库!

project->properties->Linker->Ignore Specific Library 添加 uafxcwd.lib Libcmtd.lib

在Additional Dependencied添加uafxcwd.lib Libcmtd.lib

但我找的vc里的工程->设置->连接->分类(输入)->忽略库,这个跟第一句是对应的吗?
第二句的
Additional Dependencied,应该是哪里,急等解释,谢谢
小赵儿 2012-08-13
  • 打赏
  • 举报
回复
哦 好的,我改改
yyyyy_3 2012-08-13
  • 打赏
  • 举报
回复
没有设lib
重装vs2008
淡定的飘着 2012-08-13
  • 打赏
  • 举报
回复
配置库有问题,你一个一个解决吧
小赵儿 2012-08-13
  • 打赏
  • 举报
回复
是我忽略的那个库的原因吗,Nafxcwd.lib这个库被我忽略了,我要怎么改
小赵儿 2012-08-13
  • 打赏
  • 举报
回复
我是动过那些配置,但是如果不修改配置,之前写的也有东西编不过啊。
zgl7903 2012-08-10
  • 打赏
  • 举报
回复
难道项目属性中没有选动态使用MFC库或静态链接MFC库?
傻X 2012-08-10
  • 打赏
  • 举报
回复
应该是楼主动过配置了,MFC使用库是不是动过了?

建立个新项目对比下吧
  • 打赏
  • 举报
回复
缺lib
schlafenhamster 2012-08-10
  • 打赏
  • 举报
回复
你强制忽略了什么库(lib)?
ouyh12345 2012-08-10
  • 打赏
  • 举报
回复
貌似是基本的运行库
检查一下库包含路径

16,472

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧