User forums > Using Code::Blocks
Compiling a wxWidgets application - wx/setup.h: No such file or directory
svaens:
Hi all,
First, I realise that someone has posted a similar topic with similar subject title. However, It did not seem to come to conclusions that helped me out much. And the topic was very old, and rather than reply to that, i started a new topic. Hope that is ok.
I am a newcomer to codeblocks, and also a newbie at wxWidgets. I'll briefly outline what I HAVE achieved, and where I am stuck.
1. Installed code::blocks, and tested by compiling first a windows console app, and then a standard win32 gui. (ALL GOOD)
2. Installed and built wxWidgets using MinGW and MSYS. Build went perfect, and was able to test make 'making' a sample project from command line. (ALL GOOD)
Sample = samples\minimal
Documentation I followed in building wxWidgets:
http://www.wxwidgets.org/wiki/index.php/Compiling_WxWidgets_With_MSYS-MinGW
3. Try building a sample wxWidgets application for first time using code::blocks
i.e. (New Project->wxWidgets Project->wxWidgets 2.8.x
(PROBLEMS!!)
I enter the path of my wxwidgets build, and specify seperately the path of the include, lib, and obj files. eg
(#wx.include)
(#wx.msw-debug.lib)
(#wx.msw-debug)
where the Base is the path of my wxWidgets build, at C:\dev\wxWidgets-2.8.4,
AND i had built it as instructed in a child directory, msw-debug
First problem I encounter is from the wizard screen that starts with "Please select various configuration options."
After clicking next, i see the Warning message box saying "A matching Debug configuration cannot be found in the wxWidgets directory you specified...."
It says this for both Debug target and Release target.
At this stage I figure that this means for some reason it can't find my lib files. And i decide i will try and fix this later in the project options. So I continue.
I select all additional wxwidget libraries to add to the project. And Finish.
On building a file, I get the following compile errors
Compiling: testwxApp.cpp
In file included from C:/dev/wxWidgets-2.8.4/include/wx/defs.h:21,
from C:/dev/wxWidgets-2.8.4/include/wx/event.h:15,
from C:/dev/wxWidgets-2.8.4/include/wx/app.h:20,
from C:\Temp\TestProject\testwx\/testwxApp.h:13,
from C:\Temp\TestProject\testwx\testwxApp.cpp:18:
C:/dev/wxWidgets-2.8.4/include/wx/platform.h:196:22: wx/setup.h: No such file or directory
C:/dev/wxWidgets-2.8.4/include/wx/chkconf.h:98:9: #error "wxUSE_DYNLIB_CLASS must be defined."
C:/dev/wxWidgets-2.8.4/include/wx/chkconf.h:106:9: #error "wxUSE_EXCEPTIONS must be defined."
C:/dev/wxWidgets-2.8.4/include/wx/chkconf.h:114:9: #error "wxUSE_FILESYSTEM must be defined."
etc, etc
So, it seems that there is a wx/setup.h in the lib path ?? This is strange. Anyway. This is probably my problem.... But I can't find where I should add this path (for additional includes) so that it can find it.
Also, why was I receiving those Warnings at the construction of the project. Is it because I built my wxWidgets to $base/msw-debug instead of directly in the wxWidgets base folder?? If so, surely there is a way to setup the project to handle this.
Please Help!!!!!
Thanks and Kind Regards,
svaens
dje:
Hi !
As far as I remember, when you build wxWidgets, a setup.h is generated in a lib subdirectory.
You have to put it in the include paths too.
Dje
Biplab:
C::B's wxWidgets wizard does not support MSYS-MinGW compiled wxWidgets lib. On Windows, please compile wxWidgets from command prompt which wizard can detect and configure.
thatgui:
got the same problem. djes tip did the trick -> maybe this could be added to the wiki ?
ggpr:
I also think theres a setup0.h hidden in the directorys somewhere that can be placed where it needs to be
Navigation
[0] Message Index
[#] Next page
Go to full version