내가 다음과 같은 오류가 발생했습니다LNK2019 오류가
"대해서는 2 9 오류 LNK2019 : Verweis 안녕히 nicht의 aufgelöstes externes 기호", "대중 : BOOL __cdecl gameClass :: 대해 getAttribute (클래스 표준 : : basic_string, 클래스 std :: allocator>) "("std :: allocator>) "($ getAttribute @ _N @ gameClass @@ QEAA_NV? $ basic_string @ DU? char_traits @ D @ std @@ V? $ allocator @D @ 2 @ std @@@ Z)" Funktion에서 "주요"C :. \ 사용자 \ Weexe 프로젝트 \ 엔진 \ 엔진 \의 main.obj 엔진 "
내 코드 class.h \ 비주얼 스튜디오 2010 \ 문서 \
template <typename T> T getAttribute(std::string attribute);
class.cpp
template <typename T>
T gameClass::getAttribute(std::string attribute)
{
std::map<std::string,int> matchAttribute;
matchAttribute["windowTitle"]=1;
matchAttribute["windowSizeX"]=2;
matchAttribute["windowSizeY"]=3;
matchAttribute["isMenue"]=4;
switch(matchAttribute[attribute])
{
case 1:
return this->windowTitle;
break;
case 2:
return this->windowSizeX;
break;
case 3:
return this->windowSizeY;
break;
case 4:
return this->isMenue;
break;
}
}
어느 하나가 어떻게 오류를 수정하는 idear가? 나는 그것의 구문 오류 또는 smth 그런 생각 :/
또한 누군가가 장난을 치고 OS 언어를 독일어로 변경 한 것 같습니다. –
장난이 아니며 나는 독일인입니다. – Weexe
오, 죄송합니다. –