can't open cursor file `wx/msw/hand.cur': Invalid argument

If you are using wxDev-C++ for your wxWidgets design, please ask your questions here instead of in IDE Related.
Post Reply
theWolf
Knows some wx things
Knows some wx things
Posts: 43
Joined: Wed May 18, 2005 12:27 am

can't open cursor file `wx/msw/hand.cur': Invalid argument

Post by theWolf »

Hello all,

Just download (5/17/2005) the latest wx-devcpp set up.
When I try to compile the Opengl example, I get:

Resource error:
can't open cursor file `wx/msw/hand.cur':invalid argument

I've searched the group and have tried the suggestion to reset the paths to the resources and includes. I'm using D:\Dev-cpp. I also tryed replacing the resources with the latest one from wxWidgets.

Can't figure it out.

Thank you.
tiwag
Earned some good credits
Earned some good credits
Posts: 123
Joined: Tue Dec 21, 2004 8:51 pm
Location: Austria

Post by tiwag »

you need to give the resource compiler the right include path
to the wxwidgets include directory.
--tiwag
theWolf
Knows some wx things
Knows some wx things
Posts: 43
Joined: Wed May 18, 2005 12:27 am

Strange

Post by theWolf »

Today I booted the computer and read the suggestion in the reply to my post.

"Set the path to the resource compiler".

The only place I could find to set paths was in Project|Project Options -> Directories (tab). I'm assuming this is the path to the resources that the resource compiler compiles and not the path the the resource compiler, itself. (I'm not familiar with all of Dev-cpp's menu options etc.)

Anyways...

I tried compiling the project. It "compiled" - that is, the project compiled and ran but the cursor was "Strange". (When I quit closed the project app the strange cursor stayed.)

The cursor was a right arrow with debis all around it - ie the resource compiler is not using the correct memory location to get the cursor data. And thus the error description "Invalid argument" may have been indicating a problem other than the incorrect path.

Any Ideas? Thanks much. :?:
buildere
Super wx Problem Solver
Super wx Problem Solver
Posts: 358
Joined: Thu Oct 28, 2004 3:45 pm
Location: Costa Rica

Post by buildere »

I had issues with this the first time I've installed wxDevCpp and the reason was that I used a folder with spaces in the path of the installation of the program. Check if yours is installed in a folder like that (for example "Program Files"), and reinstall on the disk root if so....
theWolf
Knows some wx things
Knows some wx things
Posts: 43
Joined: Wed May 18, 2005 12:27 am

Post by theWolf »

Buildere,

Thank you for the response.

That's not it. The path is "D:/Dev-cpp" - no spaces.

BWT:
I do have "C:\wxWidgets-2.6.0" on my C drive and in My computer's Environment Variables I have a User variable "WXWIN" set to "C:\wxWidgets-2.6.0".

With the error "Invalid Argument" and the garbage showing on the screen around the cursor, it seems like the problem is maybe an incompatibility of versions of something - was the way cursors are processed changed recently? I checked the properties for "winres.exe" and the created date is "Saturday, January 29, 2005, 5:35:14 PM".

I've run out of ideas.
tiwag
Earned some good credits
Earned some good credits
Posts: 123
Joined: Tue Dec 21, 2004 8:51 pm
Location: Austria

Re: Strange

Post by tiwag »

theWolf wrote:...The only place I could find to set paths was in Project|Project Options -> Directories (tab). I'm assuming this is the path to the resources that the resource compiler compiles and not the path the the resource compiler, itself...
you are correct, Have you set in
Project Options -> Directories -> Resurce Directories = "C:\wxWidgets-2.6.0\include" ???

that's what you have to set accordingly to your posted wxWidgets setup.

btw: the WXWIN environment variable isn't used when using GCC from wxDevCpp. this WXWIN is only used by certain makefiles.

HTH
--tiwag
buildere
Super wx Problem Solver
Super wx Problem Solver
Posts: 358
Joined: Thu Oct 28, 2004 3:45 pm
Location: Costa Rica

Post by buildere »

Just a question: You said you're using wx-devcpp (I assume you're using Guru's version of DevCpp)... Why do you have wxWidgets installed in its own ("C:\wxWidgets-2.6.0")? wxDevCpp is supposed to work with wxWidgets out of the box, and if you need to use 2.6.0 you can uninstall the current devpack and add a new one from here: http://devpaks.org/show.php?devpak=206 or various others. I'm sorry if you have a good reason for this, I'm not trying to be nasty or anything, just asking-pointing that out because maybe you didn't know...
theWolf
Knows some wx things
Knows some wx things
Posts: 43
Joined: Wed May 18, 2005 12:27 am

re: wx/msw/hand.cur':invalid argument

Post by theWolf »

buildere,

>Why do you have wxWidgets installed in its own
>("C:\wxWidgets-2.6.0")?

I found wxDev-cpp after I had been using WxWidgets and regular dev-cpp for a while. So when I found it I uninstalled my old Dev-cpp and installed the complete wxDev-cpp package (wx-devvcpp-6.7beta_setup.exe) to d:\Dev-cpp and left my C:\wxWidgets-2.6.0 alone - because I'm using WxWidgets quite successfully in .net 2003. I also have a c:\MinGW. These should not be effecting the complete installation of wxDev-cpp?

>I'm not trying to be nasty or anything

I understand. Thank you for helping.

I did have the paths correctly set to the stuff in d:\dev-cpp when the problem occured.

**** The last time I compiled, it had "auto-magically" fixed itself - so we may never know what caused it. If it happens again I'll post.

I think we all need to scratch our heads when it looks like memory is being stepped on - it looked like the resource compiler was reading too much data to get the extra stuff around the cursor - maybe it was expecting a null delimiter and didn't find it where it should have been??

best regards.
[/quote]
______________
WxWidgets 2.6.1, .net 2003, Windows2000
Sometimes there's a lot of gravel around the gems. WxWidgets is a gem!
Djakisback
In need of some credit
In need of some credit
Posts: 4
Joined: Thu Sep 01, 2005 8:50 pm
Location: France

Post by Djakisback »

Hi, I have the same problem. After trying many stuffs I've modified "wx/msw/wx.rc" to write absolute paths for ressources and now it works.

Bye :)
tbreina
Moderator
Moderator
Posts: 1289
Joined: Thu Nov 25, 2004 7:38 pm
Location: Coronado, CA

Post by tbreina »

https://sourceforge.net/tracker/index.p ... tid=611982

It's mostly like this is the bug that you're running into. Not so much of a bug as a misunderstanding of how many people were working with the IDE.

The basic idea is that we don't know where your wx/msw/wx.rc file will be since some people don't install into the default directory. To compensate, we changed the template files (Templates\0-wxWidgets.template and Templates\00-wxWidgets.template) to use a %DEVCPP_DIR% macro that is converted to the install path when the project is first created. Mal added this macro to the wx samples too.

However, when I coded %DEVCPP_DIR% I used a variable that was actually the user's working directory. Many users change that directory and the macro no longer works. In the latest alpha, I changed it to refer to the directory where the devcpp.exe resides. Hopefully, this will be a solution that will work for (almost) everyone correctly.

So in short, it should be corrected in CVS now and you can try the alpha devcpp.exe to verify. You should also double-check your Templates to make sure that the %DEVCPP_DIR% macro hasn't been corrupted.


HTH
-Tony
Everybody's got something to hide except for me and my monkey.
NickDX
Knows some wx things
Knows some wx things
Posts: 39
Joined: Thu Sep 30, 2010 8:18 pm

Re: can't open cursor file `wx/msw/hand.cur': Invalid argume

Post by NickDX »

I just had the same problem. It seems that the project options directories keep clearing themselves, and you have to re-set them to your wxdev include directories every once in a while.
Post Reply