... 내 설치 개요 (?) :C++ LNK 오류 2019 확인되지 않은 외부 기호 가상 오류 ...
에 "인터페이스"에 "빈"GraphicsLibrary.ccp와 GraphicsLibrary.H ...
virtual void drawPoint(const Point& p, unsigned char r, unsigned char g, unsigned char b, double pointSize);
!
당연히있다void GraphicsLibrary::drawPoint(const Point& p, unsigned char r, unsigned char g, unsigned char b, double pointSize)
{
//some code
}
는 "빈은"OpenGL.h 자신의 헤더 파일입니다 (이후 : 그 인터페이스, 그래서 "OpenGL을"는 그래픽 라이브러리이기 때문에 ... 그래서는 OpenGL.CPP이가와가 GraphicsLibrary.h)
는 그때의 OpenGL을 사용하고, 그 기재 그리기 기능을 사용하는 구체적인 기능 클래스를 가지고 (OpenGLVis_Enviroment.cpp)
가OpenGL ogl;
void drawObstacleUnderConstruction(Obstacle::Type type, const vector<Point>& points)
{
for(//etcetc)
ogl.drawPoint(*it, 255, 255, 255, 3.0);
}
하지만 또한 근래
OpenGL openGL;
openGL.drawText(something);
하지만 지금은 (내가 다른 모든 기능과 같은이) 이러한 오류의 여지가 : 일부는 OpenGL 기능 ... 이 때문에 주요도있다을 사용 개 주요
1>OpenGLVis_Environment.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall GraphicsLibrary::drawPoint(struct Point const &,unsigned char,unsigned char,unsigned char,double)" ([email protected]@@[email protected]@[email protected]) referenced in function "void __cdecl DrawingFunctions::drawObstacleUnderConstruction(enum Obstacle::Type,class std::vector<struct Point,class std::allocator<struct Point> > const &)" ([email protected]@@[email protected]@@[email protected]@@[email protected]@@@[email protected]@@[email protected]@@Z)
"GraphicsLibrary :: drawPoint ..."를 사용했기 때문에이게 있습니까?
프로젝트를 어떻게 구축하고 있습니까? IDE 란 무엇입니까? –
인터페이스를 사용하는 전통적인 방식은 pure 가상 멤버 함수 ('GraphicsLibrary :: drawPoint')를 가진 추상 기본 클래스 ('GraphicsLibrary')를 갖는 것입니다.이 클래스는 파생 클래스 ('OpenGL')를'OpenGL :: drawPoint'라고 부릅니다. –
@AndyProwl 임 VS2012를 사용하여 그것을 컴파일 ... 나는 오히려 인터페이스를 만드는 전통적인 방법을 사용해야합니까? (Sander de Dycker가 말했듯이)? –