Author Topic: [SOLVED] fatal error: wx/wxprec.h: No such file or directory  (Read 22978 times)

Landslyde

  • Guest
OS: Linux Mint 17 Cinnamon (64 bit)
C::B: 13.12 (obtained from Mint repository)

Greetings Forum:

Over the last couple years I have tried unsuccessfully to get wxSmith to work with C::B. So I'm here to ask for help.

After installing C::B and libwxsmithlib0 / libwxsmithlib-dev, I start up C::B, I create a new wxWidgets project using wxWidgets 2.8x. I give the project a name, select wxWidgets as the preferred GUI builder and select a Frame-based application. I then select Use Default wxWidgets configuration and create using PCH. There is a default form already there for me to use. I click the green run arrow and it all falls apart right there.

||=== Build: Debug in third (compiler: GNU GCC Compiler) ===|
./wx_pch.h|14|fatal error: wx/wxprec.h: No such file or directory|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

And a search shows the file isn't on my computer.

I'd really like to be able to use C::B. Has a clean look to it as opposed to Qt. If anyone here can help me get C::B going, I'll name my next kid after ya! =)

Landslyde
« Last Edit: June 26, 2014, 07:39:07 pm by Landslyde »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12821
    • Travis build status
Re: fatal error: wx/wxprec.h: No such file or directory
« Reply #1 on: June 26, 2014, 10:27:08 am »
Install the libwxgtk-dev package and you're good to go.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Landslyde

  • Guest
Re: fatal error: wx/wxprec.h: No such file or directory
« Reply #2 on: June 26, 2014, 07:38:18 pm »
Install the libwxgtk-dev package and you're good to go.

Well, now isn't that a twist of the lime! 
Wonder why this file isn't included as to make things simpler? :D

Thank you. All is well.

Landslyde

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9603
Re:
« Reply #3 on: June 26, 2014, 09:56:27 pm »
Because it's not only that file but a whole sdk... Which it's really large and most people don't need it. It's up to the developer to setup it's environment as needed... With the help of our wiki in the case of C::B. :-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline earlgrey

  • Multiple posting newcomer
  • *
  • Posts: 102
Re: [SOLVED] fatal error: wx/wxprec.h: No such file or directory
« Reply #4 on: July 31, 2015, 08:09:12 pm »
This error appears also when compiling C::B from C::B ( using codeblocks_unix.workspace ).
Defining environment variable WX_CONFIG as "wx-config" is mandatory.
You can set it within C::B ( Settings > Environment > Environment variables )
* OS = Debian Buster - Linux 4.19.06 x64 SMP
* C::B = svn11267 wx-3.0.4 - Linux, unicode 64 bit

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12821
    • Travis build status
Re: [SOLVED] fatal error: wx/wxprec.h: No such file or directory
« Reply #5 on: July 31, 2015, 09:09:34 pm »
earlgrey: I don't think you're correct. CB's project don't rely on env variables being set.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]