Recent

Author Topic: Error: Error while compiling resources  (Read 3717 times)

hakelm

  • Full Member
  • ***
  • Posts: 153
Error: Error while compiling resources
« on: March 29, 2012, 05:58:22 pm »
Today I tested my new Lazarus 0.9.30.4 on Windows with some of the supplied examples and got error messages like:
lclimager.lpr(26,1) Error: Error while compiling resources
The problem disappears if you remove or comment out the line similar to:
{$IFDEF WINDOWS}{$R lclimager.rc}{$ENDIF}
This doesn't seem to be an issue on Linux.
H


Leledumbo

  • Hero Member
  • *****
  • Posts: 8785
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Error: Error while compiling resources
« Reply #1 on: March 30, 2012, 01:26:27 am »
I've answered a few questions about this. This is caused by the change in resource directive used in the .lpr. If you create new project, you'll see that it's now:
Code: [Select]
{$R *.res}instead of:
Code: [Select]
{$IFDEF WINDOWS}{$R lclimager.rc}{$ENDIF}Simply change to the former to solve this issue. Of course it doesn't happen on linux or other non-windows platform as the directive is only active for windows target previously. Since version 2.4, the compiler supports resources on all platforms.

 

TinyPortal © 2005-2018