User forums > General (but related to Code::Blocks)
My wxWidgets app in Code::Blocks is not compiling
davidp:
I just recently installed wxWidgets. I did the wxMSW option and compiled it successfully, so I installed version 2.8.9. I installed it to the following directory:
C:\Program Files\CodeBlocks\MinGW\wxWidgets-2.8.9
The global var in Code::Blocks points to that directory.
Then I created a new wxWidgets project in Code::Blocks. I opted to use wxSmith.
When I try to compile, I get the following error:
--- Quote ---C:\DOCUME~1\DAVIDP~1\MYDOCU~1\CODEBL~1\WIDGET~1\resource.rc|3|wx/msw/wx.rc: No such file or directory|
||preprocessing failed.|
||=== Build finished: 2 errors, 0 warnings ===|
--- End quote ---
"resource.rc" (which was automatically generated by the Code::Blocks wizard) looks like this:
--- Quote ---aaaa ICON "wx/msw/std.ico"
#include "wx/msw/wx.rc"
--- End quote ---
However, when I look at "C:\Program Files\CodeBlocks\MinGW\wxWidgets-2.8.9\wx\msw" there is very clearly a wx.rc file. It exists...no doubts. What could be my problem?
stahta01:
You need to make sure the resource search folder is set up for the project.
"Project" -> "Build options"
Tab "Search Directories"
Sub Tab "Resource Compiler"
I have $(#WX.include) but you might need "C:\Program Files\CodeBlocks\MinGW\wxWidgets-2.8.9\include"
Note: I try to avoid paths with spaces in them.
Tim S
davidp:
I looked in my project build options, and under "Search Directories -> Resource Compiler" this one is listed:
$(#wx)\include
$(#wx) is my global variable for the location of wxWidgets, which last time I mentioned is:
C:\Program Files\CodeBlocks\MinGW\wxWidgets-2.8.9
So if in my resource file I say:
#include "wx/msw/wx.rc"
Shouldn't it look in this directory:
C:\Program Files\CodeBlocks\MinGW\wxWidgets-2.8.9\include\wx/msw/wx.rc
The file most definitely exists in that directory.
Jenna:
Please change "Settings -> Compiler and debugger... -> Global compiler settings -> <the compiler you use> -> Other settings (rightmost tab) -> Compiler logging" to "Full command line" and post the appropriate part of the build log.
RageKing:
Let me know if you find a solution to this. I am having the exact same issue.
Navigation
[0] Message Index
[#] Next page
Go to full version