I have installed WxWidgets 3.0.4 but when I try to build the blank template included from wxWidgets it says ‘no such file setup.h’ and the points out a line where setup.h was included from the directory wx/setup.h
Asked
Active
Viewed 807 times
-1
-
Related: https://stackoverflow.com/questions/17360635/glibconfig-h-no-such-file-or-directory (it's answering a different question, but you can use the information about adding include directories with the -I (capital I) switch, and you'll eventually need to point the linker at the dlls anyway. – jonsca Oct 12 '18 at 22:41
-
Could you please give me a proper break down because this so my first time doing this type of stuff – Dami Oct 12 '18 at 22:54
-
I haven't used this IDE in a long time, so I don't know where all of the settings live anymore. This seems to be a fairly decent walkthrough - http://www.learncpp.com/cpp-tutorial/a3-using-libraries-with-codeblocks/ – jonsca Oct 12 '18 at 23:00
1 Answers
2
I'm assuming you're using windows. If not ignore the rest of this answer. I'm also assuming you've already built the wxWidgets libraries. If not you need to do that first.
This error almost always means 1 of 2 things. The most likely cause is that you didn't give the codeblocks wizard the correct location for the root folder of the wxWidgets distribution. The best way to do this is as follows:
- From the codeblocks menu, select Settings->Global variables...
- This will pop up a dialog that looks like this:
- Hit the new button and enter "wx" for the name of the new variable.
- Hit the "..." next the "base" item and then select the root folder for your wxWidgets distribution (the folder containing build, include, lib, etc).
- Now try to create a new wxWidgets project and on the 6th page of the wizard enter "$(#wx)" for the location. Like so:
Now if you complete the wizard, you should be able to build and run the project.
If the project still won't build, the you probably have the second problem I mentioned above which is that some of the other settings you entered in the wizard don't match the settings you built the wxWidgets library with. I've described how to fix this here.

New Pagodi
- 3,484
- 1
- 14
- 24
-
Hello I have solved it, I just uninstalled then deleted the old wxWidgets directory then I used this guide http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef – Dami Oct 13 '18 at 12:32