VC++ 6 链接器错误
基本上,发生的事情是这样的:我有一个 VC6 工作区(总共包含 3 个项目),在无法成功将其移植到 VS2010 后,我在虚拟机上安装了 XP(主机上是 Win 7),并在开发盒。
从那里,我能够克服编译错误,并首先陷入一大堆链接器错误......
而且我不知道出了什么问题。如果有人能帮助我,我将不胜感激!
(构建日志的摘录,总共有 41 个链接器错误...)
>Linking...
MainFrm.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall ReportMenuBuilder::~ReportMenuBuilder(void)" (??1ReportMenuBuilder@@UAE@XZ)
MainFrm.obj : error LNK2001: unresolved external symbol "public: __thiscall ReportMenuBuilder::ReportMenuBuilder(void)" (??0ReportMenuBuilder@@QAE@XZ)
MainFrm.obj : error LNK2001: unresolved external symbol "public: bool __thiscall ReportMenuBuilder::Build(bool)" (?Build@ReportMenuBuilder@@QAE_N_N@Z)
MainFrm.obj : error LNK2001: unresolved external symbol "public: int __thiscall CReportMultiDocTemplate::GetDocumentCount(void)const " (?GetDocumentCount@CReportMultiDocTemplate@@QBEHXZ)
MainFrm.obj : error LNK2001: unresolved external symbol "public: class CString __thiscall ReportMenuBuilder::GetFilespecGivenID(unsigned int)const " (?GetFilespecGivenID@ReportMenuBuilder@@QBE?AVCString@@I@Z)
我唯一能想到的是,这些项目显然无法从其他项目中查看必要的文件,但我不知道为什么。
Basically, what's happening is this: I have a VC6 workspace (contains 3 projects total), and after NOT being able to succesfully port it into VS2010, I installed XP on a virtual machine (Win 7 on host machine), and installed VS6 on the devbox.
From there, I was able to get past compilation errors, and land headfirst into a whole slew of linker errors...
and I have no idea what's wrong. If anyone could help me with this it would be tremendously appreciated!
(an excert from the build log, there's 41 linker errors total...)
>Linking...
MainFrm.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall ReportMenuBuilder::~ReportMenuBuilder(void)" (??1ReportMenuBuilder@@UAE@XZ)
MainFrm.obj : error LNK2001: unresolved external symbol "public: __thiscall ReportMenuBuilder::ReportMenuBuilder(void)" (??0ReportMenuBuilder@@QAE@XZ)
MainFrm.obj : error LNK2001: unresolved external symbol "public: bool __thiscall ReportMenuBuilder::Build(bool)" (?Build@ReportMenuBuilder@@QAE_N_N@Z)
MainFrm.obj : error LNK2001: unresolved external symbol "public: int __thiscall CReportMultiDocTemplate::GetDocumentCount(void)const " (?GetDocumentCount@CReportMultiDocTemplate@@QBEHXZ)
MainFrm.obj : error LNK2001: unresolved external symbol "public: class CString __thiscall ReportMenuBuilder::GetFilespecGivenID(unsigned int)const " (?GetFilespecGivenID@ReportMenuBuilder@@QBE?AVCString@@I@Z)
Only thing I can think of is apparently the projects are having trouble seeing the necessary files from the other projects, but I don't know why.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我的第一个猜测是您尚未将 .lib 文件添加到其他项目的附加导入中。如果您已转储二进制文件并查看是否看到导出。
My first guess would be you haven't added the .lib file to the additional imports of the other projects. If you have dumpbin the binaries and see if you see the export.