1

主要问题

我正在尝试构建一个涉及链接列表和一些自定义类的家庭作业项目,但是当我构建项目时,我收到以下 3 个链接器错误...

1>customerImp.obj : error LNK2019: unresolved external symbol "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl operator<<(class std::basic_ostream<char,struct std::char_traits<char> > &,class linkedListType<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > const &)" (??6@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AAV01@ABV?$linkedListType@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@@@Z) referenced in function "public: void __thiscall customerType::printRentedVideo(void)" (?printRentedVideo@customerType@@QAEXXZ)
1>testVideoStore.obj : error LNK2019: unresolved external symbol "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl operator<<(class std::basic_ostream<char,struct std::char_traits<char> > &,class linkedListType<class videoType> const &)" (??6@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AAV01@ABV?$linkedListType@VvideoType@@@@@Z) referenced in function _main
1>testVideoStore.obj : error LNK2019: unresolved external symbol "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl operator<<(class std::basic_ostream<char,struct std::char_traits<char> > &,class linkedListType<class customerType> const &)" (??6@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AAV01@ABV?$linkedListType@VcustomerType@@@@@Z) referenced in function _main

我做了很多编程,但直到现在还没有遇到过链接器错误,所以我在破译和调试错误时遇到了麻烦。我在下面的链接中的公共 DropBox 中放置了一个带有原始源代码的 zip 文件以及带有“构建”项目的解决方案文件。我在 64 位 Windows 8 计算机上使用 Visual Studio 2012。Build Specs 设置为 Debug / Win32 平台。

https://dl.dropbox.com/u/101002796/Rinehart-P07v2.zip

补充说明:

  • 大部分来源是书籍来源,似乎没有错误
  • 没有导师的想法。他和我一样一无所知
  • 我尝试在 Windows 7 Dev 环境中构建,但没有成功。
  • 我已经尝试将所有实现添加到头文件中,仍然是同样的错误
  • 我已经尝试了论坛/博客/等中的许多其他解决方案步骤,但 nada 有效

快速帮助将不胜感激,因为我在这个编程项目到期之前完成了大量的微积分,我兼职工作,并且已婚(已婚的人应该理解),所以像这样令人讨厌的小调试问题是一个祸根生产率。

提前一百万谢谢,~Sean R.

4

0 回答 0