Page 1 of 3
File not found bclasses.ico
Posted: Sat Mar 06, 2021 10:10 am
by Hollo2712
Hello at all,
I am a liitle bit stupid, but I ported a VO-Project to XSHARP, using some external tools like BCLASSES. Now I get the error "C:XIDEProjectswsVereinXbDefinesVersion (Info).rc(1) : error RC2135 : file not found: BCLASSES.ICO". The responding Sourceline is _BICOCLASSES ICON BCLASSES.ICO
Now I can't get any Info of how the XIDE resoveses thist file name with some Variable Path from the Project. I alrready tried to copy the necessary files in some directories in the project-path and/or used %ProjectPath%. But this error remains.
There must be something I do not recognize to set the right path for Resource-Files like Icons.
Can anyone give me a hint.
Many thanks
Horst
File not found bclasses.ico
Posted: Sat Mar 06, 2021 10:48 am
by wriedmann
Hi Horst,
please open that file (C:XIDEProjectswsVereinXbDefinesVersion (Info).rc) and look where the file is expected.
Wolfgang
File not found bclasses.ico
Posted: Sun Mar 07, 2021 7:08 am
by Hollo2712
Hi Wolfgang,
this is the point: I don't know how to change the source in a manner, that the compiler finds the icon. The question is, which search-path is used by the compiler and which envrionmental variables ca be used to subreference a dircectory relative to the project path.
As mentioned I tried the following: "_BICOCLASSES ICON %ProjectPath%BCLASSES.ICO" - this didn't work. I changed the Project Properties to relative Addressing, but I saw nothing changed.
Horst
File not found bclasses.ico
Posted: Sun Mar 07, 2021 9:11 am
by Chris
Hi Horst,
This source (.rc files) is passed directly to the resource compiler (rc.exe), so it is not possible to use the %% macros in there, instead you need to use a path relative to the Resources folder of your app (this is where all the .rc files of the app get collected and compiled all together - a rc.exe limitation).
In which folder is the .ico file actually located in your disk?
File not found bclasses.ico
Posted: Mon Aug 01, 2022 5:35 am
by JohnBonnett88
Hi Chris,
I have this same problem. I had a line like this in a .rc file
BICOCLASSES Icon C:UsersXVJBONNEsourcereposLabProIconsbClasses.ico
And tried changing to a relative path to work for any user
BICOCLASSES Icon ....IconsbClasses.ico
I got an error
error RC2142: ellipsis requires three periods
And tried
BICOCLASSES Icon ......IconsbClasses.ico
And got the same error. I am currently assuming the resource compiler is running where the resource file is.
Is there documentation for the resource compiler?
Keep up the good work,
John
File not found bclasses.ico
Posted: Mon Aug 01, 2022 7:44 am
by Chris
Hi John,
You can try from the command prompt rc.ece /? to see some info, but this tool (from MS) is very badly documented and extremely fragile unfortunately.
In your case, I think the problem is the backslashes, the texts are treated as c-like strings, so you need to double the slashes, as in:
BICOCLASSES Icon C:UsersXVJBONNEsourcereposLabProIconsbClasses.ico
Also the relative path version should work the same way.
In case it doesn't, can you please and make sure that the format of the .rc file is ANSI? If it's UTF/Unicode etc, then it is very common for unexplainable errors like those to appear.
File not found bclasses.ico
Posted: Tue Aug 02, 2022 12:07 am
by JohnBonnett88
Thanks Chris,
With your help, I have made some progress. I changed the code to
BICOCLASSES Icon ......IconsbClasses.ico
It seems to want the 3 dots, and now I get this error
error RC2135: file not found: ......IconsbClasses.ico
Now that could mean that path is nonsense, or perhaps it is recognizing it as a proper relative path, but it is not the right one.
When rc.exe is running, what folder is it in?
Thanks again,
John
File not found bclasses.ico
Posted: Tue Aug 02, 2022 2:00 am
by JohnBonnett88
Hi Chris,
I have resolved my problem, so here is some feedback in case it helps someone else.
I found some documentation of the resource compiler here
https://docs.microsoft.com/en-us/window ... e-compiler
The documentation of the Icon statement said the file name should be a quoted string, even though their examples on the same page showed them without quotes. When you do use quotes, you don't need to double the backslashes or use "...".
I also had a mistake of my own, the relative path was wrong! It looks like the resource compiler runs in the folder where the *.rc file is, so the code that worked in my case was:
BICOCLASSES Icon "..IconsbClasses.ico"
Thanks again for your help,
John
File not found bclasses.ico
Posted: Tue Aug 02, 2022 4:58 am
by Chris
Hi John,
Glad you have it working and thanks for the detailed info!
.
File not found bclasses.ico
Posted: Tue Aug 02, 2022 6:26 am
by robert
John,
Try to use single backslashes and put double quotes around the filename.
Robert