Undefined reference to FileName::OnPanel1Paint(wxPaintEvent&)'|

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
cvbanger
In need of some credit
In need of some credit
Posts: 4
Joined: Mon Aug 27, 2018 4:09 pm

Undefined reference to FileName::OnPanel1Paint(wxPaintEvent&)'|

Post by cvbanger »

I am new to wxwidgets and found this particular code on youtube. I couldnt execute the code because it kept giving me this error. I didnt find any relevant solution to this particular problem. Can someone tell me what could be the problem behind this? I have attached a file how would the GUI look like.
Attachments
GUI.PNG
GUI.PNG (7.58 KiB) Viewed 1255 times
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7479
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Undefined reference to FileName::OnPanel1Paint(wxPaintEvent&)'|

Post by ONEEYEMAN »

Hi,
Which code you are trying to compile?
If you are getting a compiler/linker error, it is always a good idea to post the code and the relevant error(s) and not the actual screenshot...

Thank you.
cvbanger
In need of some credit
In need of some credit
Posts: 4
Joined: Mon Aug 27, 2018 4:09 pm

Re: Undefined reference to FileName::OnPanel1Paint(wxPaintEvent&)'|

Post by cvbanger »

Sorry I have attached the code now
Attachments
C___GUI___Drawing__CopyingMain.h
(2.78 KiB) Downloaded 48 times
C___GUI___Drawing__CopyingMain.cpp
(8.39 KiB) Downloaded 57 times
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7479
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Undefined reference to FileName::OnPanel1Paint(wxPaintEvent&)'|

Post by ONEEYEMAN »

Hi,
You defined a function but you never implemented it.
Do you really need to do something with the paint event there?

Thank you.
cvbanger
In need of some credit
In need of some credit
Posts: 4
Joined: Mon Aug 27, 2018 4:09 pm

Re: Undefined reference to FileName::OnPanel1Paint(wxPaintEvent&)'|

Post by cvbanger »

I didnt include that. It was already there in the code, when I wrote the code for void C___GUI___Drawing__CopyingFrame::OnClearClick1(wxCommandEvent& event). I am not sure if that function is required to make a circle or write a text for the following program
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7479
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Undefined reference to FileName::OnPanel1Paint(wxPaintEvent&)'|

Post by ONEEYEMAN »

Hi,
Well the code for this function is not in the files you attached. Hence the error.
And yes, if you will draw something (like a circle), than this event handler is required.

Thank you.
cvbanger
In need of some credit
In need of some credit
Posts: 4
Joined: Mon Aug 27, 2018 4:09 pm

Re: Undefined reference to FileName::OnPanel1Paint(wxPaintEvent&)'|

Post by cvbanger »

Hello,
I am not sure if these files will help you or not. I had total 4 files included in this GUI development. And if its going to use Paint to develop a circle what does that error mean ? undefined reference to (FileName)::OnPanel1Paint(wxPaintEvent&)'|
Attachments
C___GUI___Drawing__CopyingMain.h
(2.78 KiB) Downloaded 50 times
C___GUI___Drawing__CopyingApp.h
(567 Bytes) Downloaded 43 times
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7479
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Undefined reference to FileName::OnPanel1Paint(wxPaintEvent&)'|

Post by ONEEYEMAN »

Hi,
The error simply mean that the code for the function needs to be implemented.
As it stands right now there is no code for that function - only the declaration.

Thank you.
Post Reply