Author Topic: Erros with wxwidgets and Codeblock debaugging/building  (Read 5448 times)

Offline crzyone9584

  • Single posting newcomer
  • *
  • Posts: 5
Erros with wxwidgets and Codeblock debaugging/building
« on: May 13, 2009, 06:27:36 am »
Im trying to follow this tutorial on wxwidgets and c++

http://zetcode.com/tutorials/wxwidgetstutorial/firstprograms/

These are the errors i get.

Quote
||=== Ventaio Project, Debug ===|
/home/xxx/Documents/test/Ventaio Project/main.h|1|error: wx/wx.h: No such file or directory|
/home/xxx/Documents/test/Ventaio Project/main.h|4|error: expected class-name before ‘{’ token|
/home/xxx/Documents/test/Ventaio Project/simple.h|4|error: expected class-name before ‘{’ token|
/home/xxx/Documents/test/Ventaio Project/simple.h|6|error: expected ‘,’ or ‘...’ before ‘&’ token|
/home/xxx/Documents/test/Ventaio Project/simple.h|6|error: ISO C++ forbids declaration of ‘wxString’ with no type|
/home/xxx/Documents/test/Ventaio Project/main.cpp|6|error: expected constructor, destructor, or type conversion before ‘bool’|
||=== Build finished: 6 errors, 0 warnings ===|

How would i fix this?I tried searching google at no luck.


Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5913
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Erros with wxwidgets and Codeblock debaugging/building
« Reply #1 on: May 13, 2009, 06:39:50 am »
Did you carefully configure the wxWidgets' header file and libraries?

It seems the compiler can't find the wx/wx.h in the "include search path". :D
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline crzyone9584

  • Single posting newcomer
  • *
  • Posts: 5
Re: Erros with wxwidgets and Codeblock debaugging/building
« Reply #2 on: May 13, 2009, 06:42:39 am »
See i love forums. Im use to Visual Studio and VB.net so have a suggestion on how i go about this and where thw wx folder is included. and on that not once compiled will i need to inlude the folder wx so the files are there.

forgot to mention im running ubuntu 9.04
« Last Edit: May 13, 2009, 06:53:52 am by crzyone9584 »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Erros with wxwidgets and Codeblock debaugging/building
« Reply #3 on: May 13, 2009, 07:01:39 am »
Create a standard wxWidgets preoject with the wizard and look at the build options to see how it can be done.

Offline crzyone9584

  • Single posting newcomer
  • *
  • Posts: 5
Re: Erros with wxwidgets and Codeblock debaugging/building
« Reply #4 on: May 13, 2009, 07:15:11 am »
i didnt see anything about it. unless its part of the BUild/Release part of the setup. but like i said   i didnt see anything.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Erros with wxwidgets and Codeblock debaugging/building
« Reply #5 on: May 13, 2009, 07:26:35 am »
i didnt see anything about it. unless its part of the BUild/Release part of the setup. but like i said   i didnt see anything.

One way: "File -> New -> Project"

Offline crzyone9584

  • Single posting newcomer
  • *
  • Posts: 5
Re: Erros with wxwidgets and Codeblock debaugging/building
« Reply #6 on: May 13, 2009, 07:30:44 am »
i didnt see anything about it. unless its part of the BUild/Release part of the setup. but like i said   i didnt see anything.

One way: "File -> New -> Project"

no not that i mean where to include the search path. ive gon through the wizard and didnt see anything about including libraies adn where would wx folder be located on ubuntu 9.04

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Erros with wxwidgets and Codeblock debaugging/building
« Reply #7 on: May 13, 2009, 07:40:55 am »
i didnt see anything about it. unless its part of the BUild/Release part of the setup. but like i said   i didnt see anything.

One way: "File -> New -> Project"

no not that i mean where to include the search path. ive gon through the wizard and didnt see anything about including libraies adn where would wx folder be located on ubuntu 9.04
On linux it's done with wx-config, see the "Other options" of the compiler settings and the "Other linker options" of the linker settings.

But the thread leaves the scope of our (C::B-)forum.

It looks more like a lack of knowledge how to use wxWidgets and the questions should be asked in an apprpriate forum.

Offline crzyone9584

  • Single posting newcomer
  • *
  • Posts: 5
Re: Erros with wxwidgets and Codeblock debaugging/building
« Reply #8 on: May 13, 2009, 08:12:11 am »
thanks for the help. I got it working.