Hi Guys,
I'm having problems in use the WxCustomButton in the Code::Blocks.
This is the steps that I made:
1 - Installed the WxPack
2 - Installed the Code::Blocks
3 - Created a new Wxwidgets project;
4 - Selected the WxSmith in the options.
5 - Compiled the project. Built and showed me a plain frame, without any componente, just the bar and the Menu.
6 - Deleted the Bar and the menu. Worked fine
7 - Included a normal button(WxButton) and worked fine.
8 - Included a WxCustomButton. Got error:
C:\Temp\CancerMain.h|14|wx/things/toggle.h: No such file or directory|
C:\Temp\CancerMain.h|37|error: ISO C++ forbids declaration of `wxCustomButton' with no type|
C:\Temp\CancerMain.h|37|error: expected `;' before '*' token|
C:\Temp\CancerMain.cpp||In constructor `CancerFrame::CancerFrame(wxWindow*, wxWindowID)':|
C:\Temp\CancerMain.cpp|62|error: `Button1' was not declared in this scope|
C:\Temp\CancerMain.cpp|62|error: `wxCustomButton' has not been declared|
C:\Temp\CancerMain.cpp|62|error: `wxCUSTBUT_BUTTON' was not declared in this scope|
C:\Temp\CancerMain.cpp|62|error: `wxCUSTBUT_RIGHT' was not declared in this scope|
C:\Temp\CancerMain.cpp|62|warning: unused variable 'wxCUSTBUT_BUTTON'|
C:\Temp\CancerMain.cpp|62|warning: unused variable 'wxCUSTBUT_RIGHT'|
||=== Build finished: 7 errors, 2 warnings ===|
9 - Tried include the directory:
C:\wxWidgets2.8\additions\include in the
Project Build Options->Search directories->compiler . Got new errors:
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|102|error: expected class-name before '{' token|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|108|error: expected `)' before '*' token|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|122|error: expected `)' before '*' token|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|136|error: expected `)' before '*' token|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|151|error: `wxWindow' has not been declared|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|153|error: expected `,' or `...' before '&' token|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|159|error: ISO C++ forbids declaration of `parent' with no type|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|159|error: ISO C++ forbids declaration of `wxString' with no type|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|169|error: `wxString' does not name a type|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|170|error: expected `,' or `...' before '&' token|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|170|error: ISO C++ forbids declaration of `wxString' with no type|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|175|error: expected `,' or `...' before '&' token|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|175|error: ISO C++ forbids declaration of `wxBitmap' with no type|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|176|error: expected `,' or `...' before '&' token|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|176|error: ISO C++ forbids declaration of `wxBitmap' with no type|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|177|error: expected `,' or `...' before '&' token|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|177|error: ISO C++ forbids declaration of `wxBitmap' with no type|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|178|error: expected `,' or `...' before '&' token|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|178|error: ISO C++ forbids declaration of `wxBitmap' with no type|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|180|error: expected `,' or `...' before '&' token|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|180|error: ISO C++ forbids declaration of `wxBitmap' with no type|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|180|error: `void wxCustomButton::SetLabel(int)' and `void wxCustomButton::SetLabel(int)' cannot be overloaded|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|183|error: ISO C++ forbids declaration of `wxBitmap' with no type|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|183|error: expected `;' before '&' token|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|184|error: expected `;' before "const"|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|184|error: ISO C++ forbids declaration of `wxBitmap' with no type|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|184|error: expected `;' before '&' token|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|185|error: expected `;' before "const"|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|185|error: ISO C++ forbids declaration of `wxBitmap' with no type|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|185|error: expected `;' before '&' token|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|186|error: expected `;' before "const"|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|186|error: ISO C++ forbids declaration of `wxBitmap' with no type|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|186|error: expected `;' before '&' token|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|189|error: expected `;' before "wxBitmap"|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|189|error: `wxBitmap' does not name a type|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|193|error: expected `,' or `...' before '&' token|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|193|error: ISO C++ forbids declaration of `wxSize' with no type|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|197|error: expected `,' or `...' before '&' token|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|197|error: ISO C++ forbids declaration of `wxSize' with no type|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|198|error: `wxSize' does not name a type|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|201|error: expected `,' or `...' before '&' token|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|201|error: ISO C++ forbids declaration of `wxSize' with no type|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|202|error: `wxSize' does not name a type|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|209|error: `wxPaintEvent' has not been declared|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|209|error: ISO C++ forbids declaration of `event' with no type|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|211|error: `wxDC' has not been declared|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|211|error: ISO C++ forbids declaration of `dc' with no type|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|215|error: `wxSize' does not name a type|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|216|error: `wxSize' does not name a type|
C:\wxWidgets2.8\additions\include\wx\things\toggle.h|220|error: `wxMouseEvent' has not been declared|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build finished: 50 errors, 0 warnings ===|
Any idea in what In make wrong?
Thanks,
Joao