Author Topic: An unsuccessful swith to wx 2.9  (Read 3952 times)

Offline Radek

  • Multiple posting newcomer
  • *
  • Posts: 104
An unsuccessful swith to wx 2.9
« on: April 06, 2013, 01:28:30 pm »
With a new machine and a new installation of Debian, I decided to switch from wx 2.8.12 to wx 2.9. I was able to install Code Blocks but I am unable to compile: no wx header is found.

(1) wx-config exists and can be run from the commandline. wx-config --cflags produces, among others, -I/usr/include/wx-2.9
(2) the directory exists, it contains the wx folder and, subsequently, all needed headers. The headers can be read.
(3) The Compiler Options of the project do contain `wx-config --cflags`
(4) When compiling, the build log shows -I/usr/include/wx-2.9 on the commandline of the compiler.
(5) Once I start compiling my project, I get "wxColour does not name a type". Similarly, wxSize does not name a type  :-\
(6) Adding /usr/include/wx-2.9 explicitly to the Search Options does not help.

I seem I forget to set something somewhere. Yes, the project is now created as wx 2.9 project, not a wx 2.8.12 project, and it is an "old" project which compiles under 2.8.12 without errors and warnings. What is wrong?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: An unsuccessful swith to wx 2.9
« Reply #1 on: April 06, 2013, 02:06:06 pm »
(5) Once I start compiling my project, I get "wxColour does not name a type". Similarly, wxSize does not name a type  :-\
Fix your code. You are missing to include required header files in your code. The include chain has changed in wx29 and wx29 is more strict on that topic. It was always an error - just now you become to see it.

Note that this is not a C::B issue, so I am locking the topic now. Try a wx forum for such requests in the future to comply with the forum rules you agree to.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ