小编use*_*158的帖子

获取错误LNK2019:vS中未解析的外部符号@)!)在VC 6.0中编译正常

我试图用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)

c++ visual-studio-2010 visual-c++-2010

-1
推荐指数
1
解决办法
172
查看次数

标签 统计

c++ ×1

visual-c++-2010 ×1

visual-studio-2010 ×1