나는 좀 물건 ++ 모든 C에 초보자, 그래서 이것은 아마도 초보자의 문제 :호출 부모의 방법
#include "MAUI/Screen.h"
#include "ListScreen.h"
using namespace MAUI;
using namespace CoolPlaces::Views;
void ListScreen::show() {
Screen::show();
};
I
ListScreen.h
#ifndef _LISTSCREEN_H_
#define _LISTSCREEN_H_
#include "MAUI/Screen.h"
namespace CoolPlaces {
namespace Views {
using namespace MAUI;
class ListScreen : public Screen {
public:
ListScreen();
~ListScreen();
void keyPressEvent(int keyCode, int nativeCode) {}
void keyReleaseEvent(int keyCode, int nativeCode) {}
void pointerPressEvent(MAPoint2d point) {}
void pointerReleaseEvent(MAPoint2d point) {}
void pointerMoveEvent(MAPoint2d point) {}
void show();
};
}
}
#endif //_LISTSCREEN_H_
ListScreen.cpp 이 오류가 발생했습니다 :이 Screen::show();
호출에 D:\MosyncProjects\Views\ListScreen.cpp:22: Error: Unresolved symbol '__ZN4MAUI6Screen4showEv' line 22
호출 (이 주제의 목적 상 일부 코드 제거). 정확히 내가 여기서 잘못하고있는거야?
코드에 아무런 문제가 없습니다. 컴파일러 오류가 아니라 링커 오류입니다. 'Screen :: show()'를 정의하는 라이브러리를 링크해야한다. –
젠장 ... 그럼 내가 뭘 할 수 있니? IDE를 재시작하고 컴퓨터를 재시작하십시오. 디스크 포맷? : D –
'Screen :: show()'에 대한 구현을 제공하지 않았거나 객체 파일/라이브러리가있는 곳을 링크하지 않은 것 같습니다. –