I have downloaded cppuint v1.5.5 into my VC++ environment and it build the DEBUG version OK. However when I try to link my test code with culib I get a raft of undefined sysmbols from namespace std.
I had the same problem, and it disappeared when I changed the project setting to use the multithreaded dll run time library instead of the statically linked single threaded for each of my own projects. This is changed in
Project Settings | C/C++ | Code Generation | Use run-time library
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I came across a webpage by John Lam that may be useful. I believe it is specifically concerned with an earlier version of cppunit, but I found it useful to get cppunit to compile/link with visual c++.
I put together something similar that may be useful for ver 1.8.0. There is a very simple, barebones vc6 full project that updates the "cookbook" example for vc6 that used a Complex class. It has the settings all predone and can serve as a template. It is assumed to be 'installed' at:
<cppunit_home>\exmaples\msvc6\ComplexVc6Cookbook.
There is also a somewhat fuller example using a simple Employee class. The included .dsw and .dsp already have the settings for resolving includes, libs, and dll's. It is assumed to be 'installed' at:
<cppunit_home>\exmaples\msvc6\EmpVc6Cookbook.
There is yet another example with a less simple Employee class. It was actually written to document a possible flaw in cppunit, but can also serve as a vc6 example. Realize there is some flaky/confusing code in it that illustrate which 'handler' is called by the cppunit framework.
This Employee class has std::strings for _firstname and _lastname. Equality is considered having the first and last names being the same, without case sensitivity. Therefore, a 'deep' compare is required for CPPUNIT_ASSERT_EQUAL rather than a shallow compare of whether the pointers are the same.
This vc6 project (including .dsw, .dsp, .cpp, and .exe) has the settings for includes, multi-thread dll's, and .lib. It assumes that it is installed at:
<cppunit_home>\examples\msvc6\Emp_Vc6
Hi,
I'm very new to both C++ and VC6, so at the risk of asking a dumb question, how can I fix some compile errors occuring when attempting to build this project ComplexVc6Cookbook?
The errors I am seeing are:
examples\msvc6\ComplexVc6Cookbook\ComplexVc6Cookbook.cpp(82) : error C2593: 'operator ==' is ambiguous
examples\msvc6\ComplexVc6Cookbook\ComplexVc6Cookbook.cpp(83) : error C2593: 'operator ==' is ambiguous
examples\msvc6\ComplexVc6Cookbook\ComplexVc6Cookbook.cpp(92) : error C2593: 'operator ==' is ambiguous
Error executing cl.exe.
thanks
Steve Peterson
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have downloaded cppuint v1.5.5 into my VC++ environment and it build the DEBUG version OK. However when I try to link my test code with culib I get a raft of undefined sysmbols from namespace std.
ex) culib.lib(TestCase.obj) : error LNK2001: unresolved external symbol "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::operator+(char const *,class std::basic_string<char,struct std::char_traits<ch
ar>,class std::allocator<char> > const &)" (??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBDABV10@@Z)
datafusion.lib(Classification.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operato
r<<(int)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z)
anybody got any clues to answer this
I had the same problem, and it disappeared when I changed the project setting to use the multithreaded dll run time library instead of the statically linked single threaded for each of my own projects. This is changed in
Project Settings | C/C++ | Code Generation | Use run-time library
CppUnit assistance
I came across a webpage by John Lam that may be useful. I believe it is specifically concerned with an earlier version of cppunit, but I found it useful to get cppunit to compile/link with visual c++.
http://www.iunknown.com/Articles/fog0000000025.html
I put together something similar that may be useful for ver 1.8.0. There is a very simple, barebones vc6 full project that updates the "cookbook" example for vc6 that used a Complex class. It has the settings all predone and can serve as a template. It is assumed to be 'installed' at:
<cppunit_home>\exmaples\msvc6\ComplexVc6Cookbook.
The vc6 project (including .dsw, .dsp, .cpp, and .exe) is available directly from:
http://prdownloads.sourceforge.net/inverse/ComplexVc6Cookbook.zip
or:
http://home.att.net/~bibleinverse/Misc/ComplexVc6Cookbook.zip
There is also a somewhat fuller example using a simple Employee class. The included .dsw and .dsp already have the settings for resolving includes, libs, and dll's. It is assumed to be 'installed' at:
<cppunit_home>\exmaples\msvc6\EmpVc6Cookbook.
The vc6 project (.dsw, .dsp, .cpp, and .exe) is available directly from:
http://prdownloads.sourceforge.net/inverse/EmpVc6Cookbook.zip
or:
http://home.att.net/~bibleinverse/Misc/EmpVc6Cookbook.zip
There is yet another example with a less simple Employee class. It was actually written to document a possible flaw in cppunit, but can also serve as a vc6 example. Realize there is some flaky/confusing code in it that illustrate which 'handler' is called by the cppunit framework.
This Employee class has std::strings for _firstname and _lastname. Equality is considered having the first and last names being the same, without case sensitivity. Therefore, a 'deep' compare is required for CPPUNIT_ASSERT_EQUAL rather than a shallow compare of whether the pointers are the same.
This vc6 project (including .dsw, .dsp, .cpp, and .exe) has the settings for includes, multi-thread dll's, and .lib. It assumes that it is installed at:
<cppunit_home>\examples\msvc6\Emp_Vc6
It is available directly at:
http://prdownloads.sourceforge.net/inverse/CppUnit_EmpVc6_5.zip
or:
http://home.att.net/~bibleinverse/Misc/CppUnit_EmpVc6_5.zip
HTH,
Lynn Allan
Hi,
I'm very new to both C++ and VC6, so at the risk of asking a dumb question, how can I fix some compile errors occuring when attempting to build this project ComplexVc6Cookbook?
The errors I am seeing are:
examples\msvc6\ComplexVc6Cookbook\ComplexVc6Cookbook.cpp(82) : error C2593: 'operator ==' is ambiguous
examples\msvc6\ComplexVc6Cookbook\ComplexVc6Cookbook.cpp(83) : error C2593: 'operator ==' is ambiguous
examples\msvc6\ComplexVc6Cookbook\ComplexVc6Cookbook.cpp(92) : error C2593: 'operator ==' is ambiguous
Error executing cl.exe.
thanks
Steve Peterson