Including resource file in a project by .RC file rather than .RES file

前端 未结 6 1858
长发绾君心
长发绾君心 2020-12-15 20:16

I remember reading an article or post somewhere years ago that suggested including a resource file in a project by referencing the .rc file instead of an already compiled .r

6条回答
  •  北海茫月
    2020-12-15 21:10

    I had the same problem and found out something new.

    {$R glyphs.res glyphs.rc}
    

    this is the code for compiling glyphs.rc to glyphs.res in the pre-build. (Works with Delphi XE4)

    But this code ONLY works if it is in the *.dpr file! If you place this code, in a *.pas file as I did the first time, it will simply behave like {$R glyphs.res} and will not compile the RC file. Maybe this is a bug in Delphi.

提交回复
热议问题