+ 1
I need help with a error
I’m having issues with the game of life code. Can someone help me with Xcode
6 Antworten
+ 3
Where you run this code SwiftIntoTech? I think it's not possible to run wxwidget powered code in SoloLearn.
+ 3
Sorry, I removed discord a while back to get some space in my phone : )
I don't know if I can help in anyways, but ,.. is that the only error message displayed by xcode? cause I think there could be more *in case* of missing include file ...
Well, I'll give you a bit of a push, hope someone who does wxwidgets here can see, and help you out ...
+ 2
https://code.sololearn.com/W0RD0yyfZT6p/?ref=app
Please update the code in a private code (rule 3)
0
Undefined symbol: DrawingPanel::DrawingPanel(wxFrame*)
0
#include "DrawingPanel.h"
#include "wx/graphics.h"
#include "wx/dcbuffer.h"
wxBEGIN_EVENT_TABLE(DrawingPanel, wxPanel)
EVT_PAINT(DrawingPanel::OnPaint)
EVT_LEFT_UP(DrawingPanel::OnMouseClick)
wxEND_EVENT_TABLE()
DrawingPanel::DrawingPanel(wxFrame* parent) : wxPanel(parent, wxID_ANY)
{
this->SetBackgroundStyle(wxBG_STYLE_PAINT);
this->Bind(wxEVT_PAINT, &DrawingPanel::OnPaint, this);
this->Bind(wxEVT_LEFT_UP, &DrawingPanel::OnMouseClick, this);
}
DrawingPanel::~DrawingPanel() {
}
delete m_context;
}
void DrawingPanel::OnPaint(wxPaintEvent& event)
{
wxAutoBufferedPaintDC dc(this);
dc.Clear();
m_context = wxGraphicsContext::Create(dc);
if (!m_context) {
return;
}
m_context->SetPen(*wxBLACK_PEN);
m_context->SetBrush(*wxWHITE_BRUSH);
m_context->DrawRectangle(10, 10, 100, 100);
}
0
Im running in xcode. Is there a way i can let you login on my mac to see my code? Do you have a discord?