2017-02-21 6 views
0

내가 codeblocks와 GUI를 설계 할 때, 나는이 줄에 오류를 컴파일 가지고 :wxWidgets에 코드 : 블록 - LED 구성 요소에 대한 <wx/led.h> 누락

Led1 = new wxLed(Panel1,ID_LED1,wxColour(0,0,0),wxColour(0,255,0), 
        wxDefaultPosition,wxDefaultSize); 

오류가 보여됩니다 in the picture

나는의 제안을 따라 이 link page 나는 소스 파일 에서 lead.h/cpp 파일을 다운로드하고 내 프로젝트 폴더에 .h 파일을 포함하여 두 파일을 추가했습니다. 여기 은 led.cpp 파일의 코드 조각 중 하나입니다. ~있다 그는 내가지도 한 객체를 생성 할 필요가 작동,하지만 난 여전히 컴파일러 오류를 가지고 왜 아무 생각이 :

#include "led.h" 

#include <string.h> 

BEGIN_EVENT_TABLE (wxLed, wxWindow) 
    EVT_PAINT (wxLed::OnPaint) 
END_EVENT_TABLE() 

wxLed::wxLed(wxWindow * parent, wxWindowID id, wxColour disableColour, wxColour onColour, wxColour offColour, const wxPoint & pos, const wxSize & size) 
{ 
    Create(parent, id, disableColour, onColour, offColour, pos, size); 
} 

wxLed::wxLed() 
{ 

} 


wxLed::~wxLed() 
{ 
    delete m_bitmap ; 
} 

답변

0

컴파일러는 말하고되지 않습니다 : 당신이 대신 wxColourconst wxPoint을 전달하고 있습니다.
세 가지 색상을 전달해야하며 두 개만 전달합니다.