header included, but " undeclared function" is reported Topic is solved

If you are using wxDev-C++ for your wxWidgets design, please ask your questions here instead of in IDE Related.
Post Reply
alquimystery
In need of some credit
In need of some credit
Posts: 2
Joined: Fri Jan 31, 2014 4:51 pm

header included, but " undeclared function" is reported

Post by alquimystery »

Although I have included the <wx/dc.h> header on myapp.h and included myapp.h header on myapp.cpp ...."DrawRetangle was not declared in this scope" was reported by compiler. What do?
User avatar
eranon
Can't get richer than this
Can't get richer than this
Posts: 867
Joined: Sun May 13, 2012 11:42 pm
Location: France
Contact:

Re: header included, but " undeclared function" is reported

Post by eranon »

If wxDC:DrawRectangle is used in the framework of your myapp.cpp,

Code: Select all

#include <wx/dc.h>
should be added at the beginning of your myapp.cpp.
[Ind. dev. - wxWidgets 3.0/3.1 under "Win 7 64-bit, TDM64-GCC" + "OS X 10.9, LLVM Clang"]
alquimystery
In need of some credit
In need of some credit
Posts: 2
Joined: Fri Jan 31, 2014 4:51 pm

Re: header included, but " undeclared function" is reported

Post by alquimystery »

Thank you earnon, the problem was the missing of device context pointer ( dc.) dc.DrawRetangle .
Post Reply