Author Topic: Cannot build project from wizard (wx/app.h) not found.  (Read 6607 times)

Offline JoJo

  • Single posting newcomer
  • *
  • Posts: 7
Cannot build project from wizard (wx/app.h) not found.
« on: October 09, 2017, 05:57:50 pm »
Hi, I am new to C::B and need some guildance on how to set it up properly.

I installed C::B 13.12 on x86_64 GNU/Linux Ubuntu 16.04.2 LTS "xenial".

After building a simple "wxWidget" project with the help of the wizard, this projects fails to build as it fails to find

wx/app.h

wxWidgets is installed, and I can locate the respective headers in /usr/include/wx-3.0/wx/app.h.  Trying to fix this by manually adding -I/usr/include/wx-3.0 to the compiler's (GCC) command line options leads to even more fails, in particular it cannot find wx/setup.h (included by wx/platform.h).

What's the correct way to fix this?

Thanks.
« Last Edit: October 09, 2017, 06:06:49 pm by JoJo »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Cannot build project from wizard (wx/app.h) not found.
« Reply #1 on: October 09, 2017, 08:09:53 pm »
What wxWidgets/wxGTK packages did you install?
Include version number.

Does an wxGTK-dev or wxGTK-devel package exists? If yes, install it.

Edit1:

What does "wx-config --list" return when ran on the command line?

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline JoJo

  • Single posting newcomer
  • *
  • Posts: 7
Re: Cannot build project from wizard (wx/app.h) not found.
« Reply #2 on: October 10, 2017, 10:27:19 am »
It displays:
Code
$ wx-config --list

    Default config is gtk2-unicode-3.0

  Default config will be used for output

  Alternate matches:
    base-unicode-3.0


IIUC, C::B is a complete bundle, and I don't need to resolve each and every dependency by hand?

I am also confused that I must be root sometimes and that it's not possible to have C::B and what it needs installed in my HOME.

None of the following packages is available: wxgtk, wxGTK,  wxgtk-dev, wxGTK-dev.
« Last Edit: October 10, 2017, 10:31:01 am by JoJo »

Offline sodev

  • Regular
  • ***
  • Posts: 497
Re: Cannot build project from wizard (wx/app.h) not found.
« Reply #3 on: October 10, 2017, 05:59:38 pm »
wxWidgets has nothing to do with CodeBlocks (except that CodeBlocks uses it for its GUI ;)), CodeBlocks cant't include every dependency for every possible program you can create with it, otherwise it has to include the whole internet (except p0rn and cat videos :D).

Linux is not Windows, you usually don't install stuff in your HOME, you install it system wide. And CodeBlocks only needs root for the installation, not during usage. Unless you maybe messed up your installation by running it as root and now some files have the wrong permissions. I remember heaving read some things about this, but without further details hard to say whats the cause.

Another problem is that you are using an ancient CodeBlocks version, the project wizard of that version is definately too old to create a project for your wxWidgets 3.x version. It doesn't look like you are missing GTK dev packages, your errors look like you are missing some include paths for wxWidgets, especially the platform ones that dont reside in the usual include directory. The wizard probably created wrong includes, you can fix this by adding the proper includes by using wx-config in backticks to query the paths, but sadly i currently don't know the details about this. Or you can try to use a nightly version of CodeBlocks, there was quite some work done on that project wizard lately so it might work out-of-the-box :).

Offline JoJo

  • Single posting newcomer
  • *
  • Posts: 7
Re: Cannot build project from wizard (wx/app.h) not found.
« Reply #4 on: October 12, 2017, 04:41:04 pm »
Ok, I used C::B 13.12 as I was after something stable.  According to the project creation wizard, it would create wxWidged project for wxwidget v2.9, 2.9 and v3.0.

Anyway, I also gave some other bundles a chance and Qt Creator looks good.  Some strange designs wih their "slots", but ok...

Thanks for you kelp.