Search code examples
delphidelphi-11-alexandria

How to use .RC files with assets in another folder


I have an .RC file in my project that looks like this:

MAINICON icon "c:\assets\app\icons\myicon.ico"

The file c:\assets\app\icons\myicon.ico exists, but when I compile the project, Delphi says:

[BRCC32 Error] icon.rc(2): file not found: c:\assets\app\icons\myicon.ico

Looks like I need to follow some kind of rule to specify the complete path of my icon?


Solution

  • Try to use double backslashes like this:

    MAINICON icon "c:\\assets\\app\\icons\\myicon.ico"
    

    You should consider using relative path.