Resource File Error During Windows App Execution

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
ppinter88
In need of some credit
In need of some credit
Posts: 2
Joined: Thu Aug 02, 2018 11:11 pm

Resource File Error During Windows App Execution

Post by ppinter88 »

Getting the following resource file error during Windows application execution (Maybe due to configuration missing or resource file in wrong location):
..\..\src\cursor.cpp(399): assert 'Assert failure' failed in wxCursor::initFromStock(): Loading a cursor defined by wxWidgets failed, did you
include include/wx/msw/wx.rc from your resource file?

Not sure how to include wx.rc in the resource file since the resource file is in XML format.

Also placed wx.rc in same directory as executable, but that did not help.

What is the proper solution to get thru this?

Thanks
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4193
Joined: Sun Jan 03, 2010 5:45 pm

Re: Resource File Error During Windows App Execution

Post by PB »

The assert is about a windows resource format (.rc) which is not in XML format, you probably confused it with the XRC file. The file needs to be compiled with windows resource compiler (into .res file) and embedded into an executable by linker. Therefore it needs to be set in your project somehow, depending on the build toolchain you use.

If you want to use certain bitmaps provided by wxWidgets, you need to do what the assert message says. You must have your own resource file, otherwise your application would not have its icon embedded in the executable.
Post Reply