This suggests to me that I have not included the libraries properly, but I have followed all the instructions on the Wiki for that MoneyTest tutorial.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2008-08-06
Had similar problems with VC++ 2005
Try this:
(I've got the German version of VC++ so I'm not sure how the settings are exactly named in the English version)
In the project properties go to "linker" -> "input"
In the field "additional dependency" add:
- for Release: "odbc32.lib odbccp32.lib cppunit.lib"
- for Debug: "odbc32.lib odbccp32.lib cppunitd.lib"
I'm not sure if this going to solve your problem... But I hope so...
Cheers Luke
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Im getting the Following link errors when trying to include CppUnit into my Visual Studio 2005 project
1>cppunitd.lib(TestResultCollector.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>cppunitd.lib(StringTools.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ) referenced in function "public: class std::_String_const_iterator<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::_String_const_iterator<char,struct std::char_traits<char>,class std::allocator<char> >::operator=(class std::_String_const_iterator<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??4?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z)
1>cppunitd.lib(ProtectorChain.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>cppunitd.lib(DefaultProtector.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>cppunitd.lib(Protector.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>cppunitd.lib(TestPath.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>cppunitd.lib(TextOutputter.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>cppunitd.lib(TestResult.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>cppunitd.lib(TestSuite.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>cppunitd.lib(CompilerOutputter.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>cppunitd.lib(Message.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>cppunitd.lib(Exception.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>cppunitd.lib(Asserter.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>cppunitd.lib(AdditionalMessage.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>cppunitd.lib(TestFactoryRegistry.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>cppunitd.lib(TestSuiteBuilderContext.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ)
1>cppunitd.lib(ProtectorChain.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>cppunitd.lib(TestPath.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>cppunitd.lib(TestResult.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>cppunitd.lib(TestResultCollector.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>cppunitd.lib(StringTools.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>cppunitd.lib(TestFactoryRegistry.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ) referenced in function "protected: __thiscall std::_Container_base_aux_alloc_empty<class std::allocator<class CppUnit::TestFactory *> >::_Container_base_aux_alloc_empty<class std::allocator<class CppUnit::TestFactory *> >(class std::allocator<class CppUnit::TestFactory *>)" (??0?$_Container_base_aux_alloc_empty@V?$allocator@PAVTestFactory@CppUnit@@@std@@@std@@IAE@V?$allocator@PAVTestFactory@CppUnit@@@1@@Z)
1>cppunitd.lib(TestSuiteBuilderContext.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>cppunitd.lib(TestSuite.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>cppunitd.lib(Message.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ)
1>cppunitd.lib(TestResult.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>cppunitd.lib(TestResultCollector.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>cppunitd.lib(StringTools.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ) referenced in function "public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl CppUnit::StringTools::wrap(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)" (?wrap@StringTools@CppUnit@@SA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV34@H@Z)
1>cppunitd.lib(ProtectorChain.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>cppunitd.lib(TestSuiteBuilderContext.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>cppunitd.lib(TestSuite.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>cppunitd.lib(Message.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>cppunitd.lib(TestPath.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ)
1>C:\Programming\GD220\GDFloatOperations\Debug\GDFloatOperations.exe : fatal error LNK1120: 3 unresolved externals
This suggests to me that I have not included the libraries properly, but I have followed all the instructions on the Wiki for that MoneyTest tutorial.
Had similar problems with VC++ 2005
Try this:
(I've got the German version of VC++ so I'm not sure how the settings are exactly named in the English version)
In the project properties go to "linker" -> "input"
In the field "additional dependency" add:
- for Release: "odbc32.lib odbccp32.lib cppunit.lib"
- for Debug: "odbc32.lib odbccp32.lib cppunitd.lib"
I'm not sure if this going to solve your problem... But I hope so...
Cheers Luke