0

Visual C++ 6 で奇妙なリンカー エラーが発生します (ツールを選択していません)。私はこれをどこから調べればよいかさえわかりません (私は C++ の経験が限られています)。エラーは次のとおりです。

CScripting.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CScripting::~CScripting(void)" (??1CScripting@@UAE@XZ) 
CPythonPg.obj : error LNK2001: unresolved external symbol "private: static struct _object * CPythonPg::pyPgEnv" (?pyPgEnv@CPythonPm@@0PAU_object@@A)

これはCPythonPg.hです:

#ifndef _CPYTHONPG_H_
#define _CPYTHONPG_H_

#include <sstream>
#include <Python.h>
#include "pgt.h"

using namespace std;

class CPythonPg {

private:

    static PyObject* pyPgEnv;

public: 

CPythonPg();
~CPythonPg();

protected:

static PyObject* getPyPgEnv(PGTYPE* pgt1, PGTYPE* pgt2);

};
#endif

これはCSripting.hです: (私はこのクラスを作成していません。クラス CPythonPg にインスタンスを追加する以外は変更できません)

#ifndef _CSCRIPTING_H_
#define _CSCRIPTING_H_

#include <string>
#include <vector>
#include <map>
#include <set>
#include <exception>
#include <sstream>
#include <fstream>
#include <locale>
#include <stdlib.h>
#include <direct.h>
#include <windows.h>
#include <io.h>
#include "pgt.h"

class CPythonPg;          // added for python functionality

using namespace std;

class CScripting {

private:

    string sMod;
    string sCust;
    string sProf;
    string sScript;
    CPythonPg* pyInst;   // added for python functionality

    typedef vector<pair<string, string> > cmdLines_t;
    cmdLines_t vCmdLines;

    bool bFoundPy;        // added for python functionality

public: 

    typedef map<string, string> catalog_t;
    typedef map<string, string> envVars_t;

    CScripting(){}; 
    CScripting(string _sMod, string _sCust, string _sProf, string _sScript, PGTYPE* Pgt1, PGTYPE* Pgt2);

    virtual ~CScripting();

    int findProcessingScripts();
    void run(envVars_t& mEnvVars);
};

#endif

この種のエラーの原因は何ですか?

編集:いくつかのタイプミスを修正しました。

4

1 に答える 1