Author Topic: Help!!!how can i setup codeblocks with wxWidgets correctly on Ubuntu  (Read 2432 times)

akinggw

  • Guest
Compiling: wxdemoApp.cpp
In file included from /home/akinggw/我得程序/wxdemo/wxdemoApp.cpp:19:
/home/akinggw/我得程序/wxdemo/wxdemoMain.h:20: error: invalid use of incomplete type ‘struct wxFrame’
/usr/include/wx-2.8/wx/utils.h:50: error: forward declaration of ‘struct wxFrame’
/home/akinggw/我得程序/wxdemo/wxdemoMain.h:30: error: ‘wxCloseEvent’ has not been declared
/home/akinggw/我得程序/wxdemo/wxdemoMain.h:31: error: ‘wxCommandEvent’ has not been declared
/home/akinggw/我得程序/wxdemo/wxdemoMain.h:32: error: ‘wxCommandEvent’ has not been declared
/home/akinggw/我得程序/wxdemo/wxdemoApp.cpp: In function ‘wxAppConsole* wxCreateApp()’:
/home/akinggw/我得程序/wxdemo/wxdemoApp.cpp:21: error: cannot allocate an object of abstract type ‘wxdemoApp’
/home/akinggw/我得程序/wxdemo/wxdemoApp.h:16: note: because the following virtual functions are pure within ‘wxdemoApp’:
/usr/include/wx-2.8/wx/app.h:89: note: virtual int wxAppConsole::OnRun()
/home/akinggw/我得程序/wxdemo/wxdemoApp.cpp: In member function ‘virtual bool wxdemoApp::OnInit()’:
/home/akinggw/我得程序/wxdemo/wxdemoApp.cpp:27: error: ‘class wxdemoFrame’ has no member named ‘Show’
Process terminated with status 1 (0 minutes, 1 seconds)
7 errors, 0 warnings

My codebolcks's version is 8.02.
I have been through the google results of the following:

Maybe your setup is faulty?

We have same os. I got wx from "http://apt.wxwidgets.org/hardy-wx main" and cb from "http://lgp203.free.fr/ubuntu/hardy universe".

Using "File-New project-wxWidgets project" wizard generates a working project file for me. Magic settings are:
compiler: `wx-config --cflags`
linker: `wx-config --libs`

You may check these setting from shell (removing `'s). 

but I don't understand this:

Magic settings are:
compiler: `wx-config --cflags`
linker: `wx-config --libs`

who can tell me how to step wxWigets in codeblocks? Where settings ?? Thanks.