Page 2 of 3
File not found bclasses.ico
Posted: Wed Aug 03, 2022 4:48 am
by JohnBonnett88
Thanks Robert,
After a bit of fiddling I came to that conclusion too, and have adopted it.
John
File not found bclasses.ico
Posted: Thu Aug 11, 2022 4:52 am
by JohnBonnett88
Hi Chris (& Robert),
I spoke too soon when I thought I had fixed my problem. The particular problem I showed in my previous emails is fixed and I implemented the change in all the other .rc files throughout my solution. Unfortunately I did not rebuild everything. When I tried rebuilding one other project it failed in a similar way.
I have a line like this
ACLIENT_IMAGE Icon "..IconsAClient.ICO"
and on building, it fails like this:
error RC2135: file not found: ..IconsClient.ICO
It seems to be converting that "A" into a BS (backspace) character! The earlier "" in the string does not cause a problem.
I tried doubling the "" before the A and that is even more puzzling
error RC2135: file not found: ..Iconstt1.ico
There is still a single BS in the error and I am not sure where the "tt1" came from! Something strange going on inside the resource compiler!
Any suggestions welcome.
John
File not found bclasses.ico
Posted: Thu Aug 11, 2022 5:09 am
by Chris
Hi John,
This should had worked, are you sure you did a Rebuild after making that change?
Also are you sure the file indeed exists in that relative path? What if you use an absolute path, does it work this way?
If all fails, can you please zip and post a sample reproducing the problem, so we can have a look?
File not found bclasses.ico
Posted: Thu Aug 11, 2022 5:49 am
by JohnBonnett88
Thanks Chris,
I see in the mailing list you do not see that BS character embedded, but you can see it seems to have lost some characters, and in some cases found some spurious ones.
I think my solution will be to forget about the relative paths, and put the icon files with each project that uses them, so the paths will be simple.
The examples in the resource compiler doco only show local paths like that.
I see that for C# projects the resource compiler does not get used. The resources and settings are managed through special C# files.
Thanks again,
John
File not found bclasses.ico
Posted: Thu Aug 11, 2022 8:09 am
by Chris
Hi John,
I did test it here and it works also with relative paths (after putting double slashes), that's why I asked for a sample showing the problem. But, yeah, absolute paths are also fine, if you do not plan to be moving the solution to different folders, PCs etc.
File not found bclasses.ico
Posted: Thu Aug 11, 2022 8:43 am
by leon-ts
Hi guys,
All image resources in my X# application refer to the source using a relative path. I confirm the words of Chris - there are no problems with this.
Example from my project:
Code: Select all
Db32Icon ICON "....RESDB32.ICO"
Doc16Icon ICON "....RESDOC16.ICO"
EditDoc16Icon ICON "....RESEDITDOC16.ICO"
...
Solution structure:
- sol_struct.png (4.02 KiB) Viewed 632 times
File not found bclasses.ico
Posted: Thu Aug 11, 2022 9:00 am
by leon-ts
John,
Maybe there is some problem with the character encoding? If the rc file was created as a result of automatic transport, then try recreating the rc file and re-entering the path to the resource manually.
Best regards,
Leonid
File not found bclasses.ico
Posted: Fri Aug 12, 2022 2:04 am
by JohnBonnett88
Thanks Leonid,
That is a good suggestion but I seem to be able to work with the file in VS and Notepad++ without any issues and it has been edited by both several times.
As I mentioned previously, I started with a line like this:
ACLIENT_IMAGE Icon "..IconsAClient.ICO"
When I tried doubling the backslashes, I got an error like this from rc:
error RC2135: file not found: ..Iconstt1.ico
There is a BS character between the s and the first t in the message but that may get swallowed in the forum. That "tt1" seemed quite spurious, but I have now found out where that probably came from.
I moved the .ICO file to be with the relevant .RC file and changed the line to:
ACLIENT_IMAGE Icon "AClient.ICO"
That worked fine, but there are other .RC files in the project so it failed on the next one, which had this in it:
ATT1_ICON Icon "..IconsAtt1.ico"
and the error message was identical to that above, despite the icon files having different names. That is possibly where the spurious "tt1" came from! I think the RC program is having troubles internally keeping separate files from being tangled.
I will try to cook up a baby example that shows the problem.
John
File not found bclasses.ico
Posted: Fri Aug 12, 2022 4:47 am
by Chris
Hi John,
You need to add double back slashes, otherwise indeed the resource compiler translates "special" character sequences as such. Also being able to edit the file with other editors does not necessarily mean that the resource compiler can accept it, too. Other editors can handle any encoding formats, while the resource compiler only accepts text files in ansi format (and unfortunately gives no descriptiveerror message at all, when a file is not such, it just fails with cryptic messages).
But I do not think this is the actual problem, most likely it's just a path or the text in the quotes that's causing the trouble. If you can post a small sample, we will be able to tell you exactly what's the problem.
File not found bclasses.ico
Posted: Tue Aug 16, 2022 4:45 am
by JohnBonnett88
Hi All,
I started to look at if I could produce a small example of my problem with the relative paths for icon files but have discovered it is all a bit more complicated that it seemed.
I had relative paths like this:
_RXLAB Icon "..IconsRxLab.ICO"
I have just discovered that not all of them were giving me an error. The project containing that line above still build without error.
Where I had a build error, I change the code to be like this:
A_CLIENT Icon "AClient.ICO"
and copied the ICO file to be in the same folder as the .RC file that referenced it.
On doing a full search through all the RC files in my solution, I can find examples like this, as well as the examples above:
A_CLIENT Icon C:LabProAClient.ICO
101 ICON AppwizWINS.ICO
ICONKILSOFT ICON C:UsersXVJBONNEsourcereposLabProIconsKILSOFT.ICO
ICONKILSOFT ICON C:CAVO25BINKILSOFT.ICO
These all seem to be building OK, despite there being no Appwiz folder, and although C:LabPro exists, it has no icons in it. C:CAVO25 does not exist either. That long path above is correct, but you will notice none of these are quoted, and there are no double backslashes in sight!
I will report back if I discover anything new.
John