Hello I hope someone here can help me. I have to update an old test tool with CPPUnit which includes some classes that are rewritten. The new classes use the ATL Libary so CStrings are in real CAtlStrings. The old Test classes use MFC. In the most cases I managed to find a way to make it work togeter but now I got to a problem where I don't know how to solve it.
In the new class, which shall be tested, I have a method like this:
The used CString in this class is from ATL and defined with:
I'm not allowed to change anything in this class.
Then I have my test class which uses this class. This Testclass is defined with:
It has a message map and everything and in one method is is calling SetSystemID from CMyProtocolItem.
Now I have the problem, since this TestClass is from CWinThread it has all the MFC includes so CString is not the same CString like in CMyProtocolItem which caused the linker error 2019.
I thought I just could create a variable from type CAtlString in MyTestClass and give this one to SetSystemID when I call it but I still get a linker error 2019 unresolved external symbol.
What could I do wrong?
In the new class, which shall be tested, I have a method like this:
Code:
void CMyProtocolItem::SetSystemID (CString strSystemID)Code:
typedef CAtlString CString;Then I have my test class which uses this class. This Testclass is defined with:
Code:
class MyTestClass : CWinThread
{
}Now I have the problem, since this TestClass is from CWinThread it has all the MFC includes so CString is not the same CString like in CMyProtocolItem which caused the linker error 2019.
I thought I just could create a variable from type CAtlString in MyTestClass and give this one to SetSystemID when I call it but I still get a linker error 2019 unresolved external symbol.
What could I do wrong?