wx/wxprec.h: No such file or directory

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Cunoo
Knows some wx things
Knows some wx things
Posts: 48
Joined: Tue Jul 28, 2020 8:23 pm

wx/wxprec.h: No such file or directory

Post by Cunoo »

Hi everyone i just download and install wxwidgets but i have error like this :

Code: Select all

fatal error: wx/wxprec.h: No such file or directory
 #include <wx/wxprec.h>
          ^~~~~~~~~~~~~
compilation terminated.
I use visual studio code ubuntu 18.04
this is my c_cpp_properties.json:

Code: Select all

{
    "configurations": [
        {
            "name": "Linux",
            "includePath": [
                "${workspaceFolder}/**",
                "/usr/local/include/",
                "/usr/local/include/wx-3.1/"
            ],
            "defines": [],
            "compilerPath": "/usr/bin/clang",
            "cStandard": "c11",
            "cppStandard": "c++14",
            "intelliSenseMode": "linux-clang-x64"
        }
    ],
    "version": 4
}
but wx/wx.h working perfectly...
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wx/wxprec.h: No such file or directory

Post by doublemax »

It's not that simple. Check if there is a wx-config in your path.

https://wiki.wxwidgets.org/Wx-Config
Use the source, Luke!
Cunoo
Knows some wx things
Knows some wx things
Posts: 48
Joined: Tue Jul 28, 2020 8:23 pm

Re: wx/wxprec.h: No such file or directory

Post by Cunoo »

doublemax wrote: Wed Feb 03, 2021 5:43 pm It's not that simple. Check if there is a wx-config in your path.

https://wiki.wxwidgets.org/Wx-Config
I can compile in command line like this :

Code: Select all

g++ `wx-config --cxxflags` -o out main.cpp `wx-config --libs`
but in visual studio code not. i think problem will be in visual studio code but i dont know where :(
if i add : wx-config --libs to task.json dont work...
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7458
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wx/wxprec.h: No such file or directory

Post by ONEEYEMAN »

Hi,
Then don't use non-native application where its not useful.
Simply compile your application with what works.

Or use Anjuta (native GTK IDE), that have a template to create wxWidgets project.

Or Code::Blocks/CodeLite, which are developed with wxWidgets and has support to create wxWidgets project.

Thank you.
Cunoo
Knows some wx things
Knows some wx things
Posts: 48
Joined: Tue Jul 28, 2020 8:23 pm

Re: wx/wxprec.h: No such file or directory

Post by Cunoo »

ONEEYEMAN wrote: Thu Feb 04, 2021 12:29 am Hi,
Then don't use non-native application where its not useful.
Simply compile your application with what works.

Or use Anjuta (native GTK IDE), that have a template to create wxWidgets project.

Or Code::Blocks/CodeLite, which are developed with wxWidgets and has support to create wxWidgets project.

Thank you.
sorry but im not using code blocks becasue everytime crashing for no reason reinstalling didnt fix soo i want use vscode,
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7458
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wx/wxprec.h: No such file or directory

Post by ONEEYEMAN »

Hi,
1. I gave you 2 alternatives.
2. You should report the crashes to C::B team so that they wil be fixed.
3. If using simple command from Terminal with g++ works - stick with it. It works.

Thank you.
Cunoo
Knows some wx things
Knows some wx things
Posts: 48
Joined: Tue Jul 28, 2020 8:23 pm

Re: wx/wxprec.h: No such file or directory

Post by Cunoo »

ONEEYEMAN wrote: Thu Feb 04, 2021 8:04 am Hi,
1. I gave you 2 alternatives.
2. You should report the crashes to C::B team so that they wil be fixed.
3. If using simple command from Terminal with g++ works - stick with it. It works.

Thank you.
why configure wxwidgets its hard ?
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7458
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wx/wxprec.h: No such file or directory

Post by ONEEYEMAN »

Hi,
It is not. Really.
You just need to know what you are doing and follow an official documentation.

So does my instructions worked?

Thank you.
Cunoo
Knows some wx things
Knows some wx things
Posts: 48
Joined: Tue Jul 28, 2020 8:23 pm

Re: wx/wxprec.h: No such file or directory

Post by Cunoo »

ONEEYEMAN wrote: Thu Feb 04, 2021 9:51 pm Hi,
It is not. Really.
You just need to know what you are doing and follow an official documentation.

So does my instructions worked?

Thank you.
i just download code:blocks on different pc and working but i cant create header file in my opinion code:blocks its full buggy... i want use visual studio code but i dont know where should be a problem...
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7458
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wx/wxprec.h: No such file or directory

Post by ONEEYEMAN »

Hi,
If you are on Linux, you can try Anjuta IDE.

Install and create a project based on wxWidgets.

On the unrelated note - what version of wx you use? You compile it yourself or install from the repository? Did you get the latest version of C::B?
If you build it yourself - what is your configure line?

Did you see PB's instruction on how to use C::B with wxWidgets? Its been referenced here couple of times, and even though it is produced for Windows, there should be no differences.

Thank you.
Cunoo
Knows some wx things
Knows some wx things
Posts: 48
Joined: Tue Jul 28, 2020 8:23 pm

Re: wx/wxprec.h: No such file or directory

Post by Cunoo »

ONEEYEMAN wrote: Thu Feb 04, 2021 11:14 pm Hi,
If you are on Linux, you can try Anjuta IDE.

Install and create a project based on wxWidgets.

On the unrelated note - what version of wx you use? You compile it yourself or install from the repository? Did you get the latest version of C::B?
If you build it yourself - what is your configure line?

Did you see PB's instruction on how to use C::B with wxWidgets? Its been referenced here couple of times, and even though it is produced for Windows, there should be no differences.

Thank you.
wx 3.0.6 (don't remember I'm not on PC) I go try anjuta
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7458
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wx/wxprec.h: No such file or directory

Post by ONEEYEMAN »

Hi,
I presume you built it yourself.
What configure command did you use?

With Anjuta you need to install wxWidgets and then create the project based on GTK-> wxWidgets.

Thank you.
Cunoo
Knows some wx things
Knows some wx things
Posts: 48
Joined: Tue Jul 28, 2020 8:23 pm

Re: wx/wxprec.h: No such file or directory

Post by Cunoo »

ONEEYEMAN wrote: Fri Feb 05, 2021 8:54 pm Hi,
I presume you built it yourself.
What configure command did you use?

With Anjuta you need to install wxWidgets and then create the project based on GTK-> wxWidgets.

Thank you.
i am on laptop i dont remember (wxwidgets have on main PC) i just install code lite its wxcrafter and wxwidgets its a same ?
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7458
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wx/wxprec.h: No such file or directory

Post by ONEEYEMAN »

Hi,
If you build wxWidgets yourself - go to the wxWidgets directory and find a file config.log. Open it and you will see the configure line as one of the first line there.

Let us know how it goes with Anjuta/CodeLite.

Thank you.

P.S.: There is a main CodeLite *nix developer here with the nick of DavidHart. He can hopefully be able to chime in if/when you get any issues with the IDE.
If you get any problems with Anjuta - I can try to help solving them.
Cunoo
Knows some wx things
Knows some wx things
Posts: 48
Joined: Tue Jul 28, 2020 8:23 pm

Re: wx/wxprec.h: No such file or directory

Post by Cunoo »

ONEEYEMAN wrote: Fri Feb 05, 2021 10:50 pm Hi,
If you build wxWidgets yourself - go to the wxWidgets directory and find a file config.log. Open it and you will see the configure line as one of the first line there.

Let us know how it goes with Anjuta/CodeLite.

Thank you.

P.S.: There is a main CodeLite *nix developer here with the nick of DavidHart. He can hopefully be able to chime in if/when you get any issues with the IDE.
If you get any problems with Anjuta - I can try to help solving them.
vscode not working (idk why)
anjuta working - what version wxwidgets anjuta use ? (i dont configure any wxwidgets folders, i use normal settings) why use cxx insteaf of cpp ?
code lite working but its not my style (feel me outdated)

i try to using anjuta
wxwidgets side have some discord ?
Post Reply