Hi. I just made a sample test application in VC++ 6.0. I created a simple class called Message. It has a member variable called mMessageText which is a CString. I wrote a Send method that returns an error code if the Message.mMessageText is empty. I wrote a test case to test this behavior, and put it into a test suite.
I followed the Cookbook to do all this--with the one exception that I used TextTestRunner instead of TestRunner. Everything compiled just fine. However, when I link, I get these errors:
nafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in msvcprtd.lib(delop_s.obj)
nafxcwd.lib(timecore.obj) : error LNK2001: unresolved external symbol __mbctype
nafxcwd.lib(apphelp.obj) : error LNK2001: unresolved external symbol __mbctype
nafxcwd.lib(filelist.obj) : error LNK2001: unresolved external symbol __mbctype
nafxcwd.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argv
nafxcwd.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argc
Debug/NameTest.exe : fatal error LNK1120: 3 unresolved externals
An ideas? I do have RTTI selected, and I have included cppunitd.lib in my Project settings lib path. My active configuration is the Win32 Debug configuration. Initially, I let the MVC++ IDE set my project up as a Win32 Console Application.
Thanks for any input!
Ken
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2002-01-27
One more note: I have selected the Debug Multithreaded DLL option.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi. I just made a sample test application in VC++ 6.0. I created a simple class called Message. It has a member variable called mMessageText which is a CString. I wrote a Send method that returns an error code if the Message.mMessageText is empty. I wrote a test case to test this behavior, and put it into a test suite.
I followed the Cookbook to do all this--with the one exception that I used TextTestRunner instead of TestRunner. Everything compiled just fine. However, when I link, I get these errors:
nafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in msvcprtd.lib(delop_s.obj)
nafxcwd.lib(timecore.obj) : error LNK2001: unresolved external symbol __mbctype
nafxcwd.lib(apphelp.obj) : error LNK2001: unresolved external symbol __mbctype
nafxcwd.lib(filelist.obj) : error LNK2001: unresolved external symbol __mbctype
nafxcwd.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argv
nafxcwd.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argc
Debug/NameTest.exe : fatal error LNK1120: 3 unresolved externals
An ideas? I do have RTTI selected, and I have included cppunitd.lib in my Project settings lib path. My active configuration is the Win32 Debug configuration. Initially, I let the MVC++ IDE set my project up as a Win32 Console Application.
Thanks for any input!
Ken
One more note: I have selected the Debug Multithreaded DLL option.