我正在做一个 Visual Studio 项目
header.h
class A
{
virtual int __cdecl funct1() = 0;
};
项目 B(在编译时生成 DLL)
//projectBheader.h
#include<header.h>
#define projectBclass_DLL __declspec( dllexport )
class projectBclass_DLL projectBclass: public A
{
virtual int __cdecl funct1();
}
//projectBheader.cpp
A::int __cdecl projectBclass::funct1()
{
//definition goes here
}
但它给出了错误
error C2695: 'projectBclass::funct1': overriding virtual function differs
from 'A::funct1' only by calling convention
提前致谢