Author Topic: Problems in use WxCustomButton  (Read 7112 times)

joao.sauer

  • Guest
Problems in use WxCustomButton
« on: August 23, 2008, 11:29:21 pm »
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:
Code
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:
Code
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

joao.sauer

  • Guest
Re: Problems in use WxCustomButton
« Reply #1 on: August 26, 2008, 01:23:21 pm »
One more information now.

I following this tutorial: http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef

and I used the nightly version of the code::blocks.

But still getting the same error.

Probable is a configuration problem, but I can't figure out how to solve this!

Please, if you have any idea, I would like to try.

thanks,
Joao

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 836
Re: Problems in use WxCustomButton
« Reply #2 on: September 03, 2008, 10:31:02 pm »
The wxCustomButton is not a part of bse wxWidgets library, you need additional wxThings library (can be found on this page). I don't know whether it's available on DevPacks

Regards
   BYO