Author Topic: My wxWidgets app in Code::Blocks is not compiling  (Read 12769 times)

Offline davidp

  • Single posting newcomer
  • *
  • Posts: 3
My wxWidgets app in Code::Blocks is not compiling
« on: January 19, 2009, 11:04:49 pm »
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 ===|

"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"

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?

« Last Edit: January 19, 2009, 11:11:59 pm by davidp »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7589
    • My Best Post
Re: My wxWidgets app in Code::Blocks is not compiling
« Reply #1 on: January 20, 2009, 12:15:36 am »
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
« Last Edit: January 20, 2009, 12:17:43 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline davidp

  • Single posting newcomer
  • *
  • Posts: 3
Re: My wxWidgets app in Code::Blocks is not compiling
« Reply #2 on: January 20, 2009, 04:16:24 pm »
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.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: My wxWidgets app in Code::Blocks is not compiling
« Reply #3 on: January 20, 2009, 04:40:18 pm »
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.

Offline RageKing

  • Single posting newcomer
  • *
  • Posts: 6
Re: My wxWidgets app in Code::Blocks is not compiling
« Reply #4 on: January 21, 2009, 06:51:26 am »
Let me know if you find a solution to this.  I am having the exact same issue.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: My wxWidgets app in Code::Blocks is not compiling
« Reply #5 on: January 21, 2009, 07:14:55 am »
Let me know if you find a solution to this.  I am having the exact same issue.
As first:
if you use a path with spaces, try it without.
If I remember right, there are issues with some versions of MinGW if the path includes spaces.

As second:
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.

Offline RageKing

  • Single posting newcomer
  • *
  • Posts: 6
Re: My wxWidgets app in Code::Blocks is not compiling
« Reply #6 on: January 22, 2009, 12:19:07 am »
Ah yes, I FINALLY got everything to compile.  Turns out the spaces in the directories was the primary issue.  Wonder why it has such trouble with spaces?

Offline RageKing

  • Single posting newcomer
  • *
  • Posts: 6
Re: My wxWidgets app in Code::Blocks is not compiling
« Reply #7 on: January 22, 2009, 12:20:36 am »
Thank you for your help though :)

Offline dje

  • Lives here!
  • ****
  • Posts: 683
Re: My wxWidgets app in Code::Blocks is not compiling
« Reply #8 on: February 04, 2009, 02:38:40 pm »
honsikrey,

please remove the advertisment from your signature. It has nothing to do there.
It is the second time VW car leasing appears on this forum...

Dje

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: My wxWidgets app in Code::Blocks is not compiling
« Reply #9 on: February 04, 2009, 03:25:57 pm »
honsikrey,

please remove the advertisment from your signature. It has nothing to do there.
It is the second time VW car leasing appears on this forum...

I'll continue to remove all of "honsikrey" posts completely until he gets the message and reacts accordingly. On further ignorance we will delete his account completely.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ