cannot find unique match for symbol.该如何解决
cannot find unique match for symbol...
DLL中有个类CTest,其中有个Read方法:
int CTest::Read(int Pos, int len)
{
...
}
然后输出方法中也有个Read方法:
int __stdcall Read(const char* S) //读
{
...
return 0;
}
编译没问题,Build死活都是:LNK4022: cannot find unique match for symbol "Read "
------解决方案--------------------
你在CTest的Method里面调用Read的时候,Compiler怎么知道你想调用CTest的Read还是Global的Read呢?
如果调用CTest的Read,用this-> Read(); Global的用 ::Read就可以了,不过最后换个名字,很容易自己搞混了。
------解决方案--------------------
编译器告诉你:Read符号没有找到唯一的匹配,也就是说有两个相同的符号。
呵呵,那换个名字咯,或者叫ReadData好了
------解决方案--------------------
把其中的1个改为My_Read
------解决方案--------------------
http://topic.csdn.net/u/20070829/14/086ebea0-bfe9-40ef-a4d1-2774d50bdab5.html
DLL中有个类CTest,其中有个Read方法:
int CTest::Read(int Pos, int len)
{
...
}
然后输出方法中也有个Read方法:
int __stdcall Read(const char* S) //读
{
...
return 0;
}
编译没问题,Build死活都是:LNK4022: cannot find unique match for symbol "Read "
------解决方案--------------------
你在CTest的Method里面调用Read的时候,Compiler怎么知道你想调用CTest的Read还是Global的Read呢?
如果调用CTest的Read,用this-> Read(); Global的用 ::Read就可以了,不过最后换个名字,很容易自己搞混了。
------解决方案--------------------
编译器告诉你:Read符号没有找到唯一的匹配,也就是说有两个相同的符号。
呵呵,那换个名字咯,或者叫ReadData好了
------解决方案--------------------
把其中的1个改为My_Read
------解决方案--------------------
http://topic.csdn.net/u/20070829/14/086ebea0-bfe9-40ef-a4d1-2774d50bdab5.html