[ACCEPTED]-wxwidgets setup.h "no such file-codeblocks
wxWidgets is not built into useable libraries 29 when you "install" the wxMSW installer. This 28 is because there are so many configurable 27 elements, which is precisely what the setup.h 26 you refer to is for.
If you just want to 25 build it with default options as quickly 24 as possible and move on, here is how:
Start 23 the "Visual Studio Command Prompt." You'll 22 find this in the start menu under "Microsoft 21 Visual Studio -> Visual Studio Tools".
Change 20 to folder: [WXWIN root]\build\msw
Build default 19 debug configuration:
nmake -f makefile.vc BUILD=debug
Build default release 18 configuration:
nmake -f makefile.vc BUILD=release
Make sure the DLLs are in 17 your PATH. They'll be found in [WXWIN root]\lib\vc_dll
Under 16 the DLL folder mentioned above, you will 15 find subfolders for each build variant (The 14 instructions above made two, debug and release.) In 13 each variant folder you'll find a 'wx' folder 12 containing a 'setup.h" file. You'll see 11 that the setup.h files are actually different 10 for each build variant. These are the folders 9 you need to add to your project build configuration 8 include path, one per build variant. So, for 7 example, you'd add [WXWIN root]\lib\vc_dll\mswud 6 to the include path for your debug build, [WXWIN 5 root]\lib\vc_dll\mswu for your release build.
It 4 is possible to build lots of other variant 3 combinations: static libs, monolithic single 2 library, non-Unicode, etc. See [WXWIN root]\docs\msw\install.txt 1 for much more extensive instructions.
When building wxWidgets, it dynamically 27 creates a setup.h file for each build configuration 26 that is built. The generated setup.h files 25 are stored in folders below the lib folder, for 24 instance (Visual Studio on Windows):
To successfully 23 build a project based on wxWidgets, each 22 build configuration in the project must 21 be set up with its own Additional Include 20 Directory that points to the corresponding 19 wxWidgets build folder under lib, such as 18 the one listed above.
In addition, an Additional 17 Include Directory that is common for all 16 build configurations in the project must 15 be set to point to wxWidget's main include 14 folder. This folder is typically set up 13 in a user property sheet that can be used 12 in any project. E.g.:
For linking, an Additional 11 Library Directory common for all build configurations 10 is set up to point to the wxWidgets lib 9 folder. E.g.:
And then, specific to each 8 build configuration, Additional Dependency 7 entries are set up to include libraries 6 of the corresponding wxWidgets libraries. E.g., for 5 a Unicode, Debug build (u = Unicode, d = Debug):
Then, to 4 use wxWidgets in your project, start out 3 by including the generated setup.h file:
And 2 then include headers for specific wxWidgets 1 functionality. E.g.:
#include <wx/slider.h> #include <wx/image.h> #include <wx/control.h>
You probably need to build wxWidgets. There 3 is a post-build step in the wxWidgets build 2 process that copies the appropriate setup.h 1 into C:\wxWidgets_install_dir\include\wx.
For anything to work, you first have to 3 build the core libraries (wx_vc#.sln files). Then 2 you can work with the remainder stuff.
Remember 1 you need CppUnit for testcases to compile.
More Related questions