DEBUG FAILURE when using XRC

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
saint
Earned a small fee
Earned a small fee
Posts: 17
Joined: Mon Mar 20, 2006 11:09 am
Location: Ukraine, Dnipropetrovsk

DEBUG FAILURE when using XRC

Post by saint »

Hi everyone.

Windows XP SP1, Visual C++ 6, 7.1, wxWidgets-2.6.2

I have a problem when I try to debug wxWidgets app that using xrc resource file to create the main frame. It throws this message:
11:04:03: Cannot load resources from file 'res.xrc'.
11:04:03: Cannot load resources from file 'res.xrc'.
11:04:03: XRC resource 'MainDialog' (class 'wxDialog') not found!
But when I simply start an exe file - everything is ok. How can I debug my app?

Thanks in advance.
micros
Super wx Problem Solver
Super wx Problem Solver
Posts: 317
Joined: Sat Mar 18, 2006 10:41 am
Location: Ustek, Bohemia

Post by micros »

Somebody correct me if I'm wrong, but I think that if you debug the app, the working directory is the project directory, but the .exe is in ProjectDir/Debug (where you probably put the .xrc). I don't put resource&other files in Debug dir, because I sometimes delete it without looking there. Instead I put these files in ProjectDir/data and point debug working directory there: Project Properties->Debugging->Working Directory. The drawback is I have to copy these files if I want to run the .exe standalone.
saint
Earned a small fee
Earned a small fee
Posts: 17
Joined: Mon Mar 20, 2006 11:09 am
Location: Ukraine, Dnipropetrovsk

Post by saint »

micros, you are right, when I set working directory to ProjDir/Debug the problem is gone :) Thanks
Post Reply