0
두 개의 프로젝트가 있습니다. 하나는 DLL을 만들고 다른 하나는 DLL에 선언 된 함수를 사용해야합니다. 그러나이 문제를 구현하는 데 문제가 있습니다. 나는이 문제를 가지고있는 DLL 기능을 사용하는 프로젝트에서DLL C++에서 함수 가져 오기 문제. LNK 2001
using namespace XClass;
extern "C" __declspec(dllexport) int Compute(XClass::XClassInput input, XClassOutput &XClassOutput);
extern "C" __declspec(dllexport) int Init(string configFileName);
class xclass
{
public:
xclass(void);
xclass(constellation &Constellation, XClass::XClassConfig &XClassConfig);
void ComputeWeightingMatrix(constellation &xclass_constellation, char flagIntCont);
void ComputeGMatrix(constellation &Constellation, XClass::XClassInput &input);
private:
int _numberOfSystemStates;
};
: 다음 DLL 프로젝트에서
나는이 선언이int _tmain(int argc, _TCHAR* argv[])
{
XClass::XClassConfig xClassConfig;
XClassOutput xClassOutput;
XClass::XClassInput input;
init(input, xClassOutput);
constellation* class_constellation = new constellation(input, xClassConfig);
xclass* algorithm = new xclass(*xclass_constellation, xClassConfig);
algorithm->ComputeWeightingMatrix(*xclass_constellation, 'i');
return 0;
}
ComputeWeighting 매트릭스 기능의 코드 :
void xclass::ComputeWeightingMatrix(constellation &Constellation, char flagIntCont)
{
double sigma = 0.0;
long error;
...
}
나는 빌드하려고 할 때 :
오류 LNK2001 : 일부 토론 후 "무효 __thiscall의 xclass :: ComputeWeightingMatrix (클래스 별자리 &, 문자) 공개"(ComputeWeightingMatrix @ xclass @@ $$ FQAEXAAVconstellation @@ D @ Z?)
그렇다면'xclass :: ComputeWeightingMatrix'에 대한 코드는 어디에 있습니까? –
함수의 내용과 관련이 있습니까? 아니면 그냥 선언? – DCuser
코드 정의는 어디에 있으며 코드를 작성하는 방법은 무엇입니까? ] –