Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / CodeWarrior / July 2004



Tip: Looking for answers? Try searching our database.

new information about "Can't copy resource file..."

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
James Stein - 29 Jul 2004 09:14 GMT
After upgrading to CW Pro 9.2 recently, I've been getting some
mysterious errors such as "Can't copy resource file freevar.rsrc".

Googling, I found some stuff about this, in particular
<http://www.talkaboutmac.com/group/codewarrior.mac/messages/6940.html>
and
<http://www.cs.hmc.edu/qref/CodeWarrior_Manuals/Error_Reference_html/ERR
050_linker_errs.fm.html#475515>

Neither was helpful:
In my case, the problem is NOT "too many resources"
nor was it a filename with more than 27 characters.

One way to "fix" the problem, I discovered,
was to remove the offending resource file from the project,
then drag it back in again. The error would go away.
I didn't know why.

Now I think I have a clue.
I was trying to track down an mysterious problem,
whereby a MW demo program "magically" ignored my renaming
a couple of menu commands in a .ppob file.
I thought the app was resetting the commands after menubar
initialization, or something.

At some point, re-making the project, I got the error
"Can't copy resource file "TextDoc Demo.rsrc".
(Note that this is a .rsrc file, NOT the .ppob file with the menus.)

In a moment of inspiration or, more likely, dumb luck,
I directed the IDE to "Re-search for Files".
Then I rebuilt the project, and voila! the error went away.
BOTH errors went away:
the linker could copy the .rsrc file,
and the renamed menu commands appeared as I had originally expected.

So might there are still be bugs in how the IDE accesses files
via the access paths?  In particular, I sometimes do this sequence,
which I now wonder if it can casue problems:

(a) work on a project in a folder for a while.
(b) switch to finder and back up the folder by duplicating it.
(c) return to CW and continue working in the current folder.

Anyway, hope this helps some one.
--J
James Stein - 29 Jul 2004 17:15 GMT
[[ This message was both posted and mailed: see
  the "To," "Cc," and "Newsgroups" headers for details. ]]

OK, I think I may have found the problem:

Some (or all?) resource files in a project wind up being copied
into the 'Resources' folder in the 'Contents' folder of the target
application.

I think that the IDE sometimes tries to reference a resource file,
not in its normal position in the access paths, but in its hidden
position in the (previous version of) the target.
This probably doesn't work at link-time
and probably is harmless at other times.

So I think this is a work-around for (some instances)
of the "Can't copy resource file..." error message:

(a) delete the target application.
(b) Re-search for Files.
(c) Make the application.

Hope this helps.

-- James

ps.  I may have remembered a wrong sequence of events
in my earlier post.
Re-searching for Files may have CAUSED the problem,
not FIXED it.
As usual, take nothing I say as gospel.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.