我试图用VS2010 C++编译器编译一个14岁的C++程序(不要问为什么:().我收到以下错误
错误10错误LNK2019:未解析的外部符号"public:__thiscall CConfiguration :: CConfiguration(void)"(?? 0CConfiguration @@ QAE @ XZ)在函数"public:__thiscall CWhoisService :: CWhoisService(void)"中引用(?? 0CWhoisService @ @ QAE @ XZ)
我有一个带有头CWhoisService.h的cpp文件CWhoisService.cpp
CWhoisService.h:
class CWhoisService
{
public:
HRESULT Initialize(const char * szServiceName, REFCLSID pMetricsCLSID);
CWhoisService();
~CWhoisService();
HRESULT CheckService();
protected:
CConfiguration m_Configuration;
protected:
bool m_bStartedEvenLog;
bool m_bStartedConfiguration;
private:
//Don't want standard constructor to be called
};
Run Code Online (Sandbox Code Playgroud)
CWhoisService.cpp
#include "ConfigurationLib.h"
#include "CWhoisService.h"
CWhoisService::CWhoisService():
m_bStartedEvenLog(false),
m_bStartedConfiguration(false)
{
}
HRESULT CWhoisService::Initialize(const char * szServiceName, REFCLSID pMetricsCLSID)
{
HRESULT hr = S_OK;
//Initialize the configuration library …Run Code Online (Sandbox Code Playgroud)