Recent

Author Topic: Problem with .rc file  (Read 544 times)

Davidous

  • Jr. Member
  • **
  • Posts: 75
Problem with .rc file
« on: April 13, 2020, 03:49:19 pm »
Hello!

I would like to compile my program with an .rc file. Until now I had no problem with it, but now it won't compile for some reason. The .rc file contains the following lines:

EK BITMAP "D:\lazarus\UH feldolgozás és értékelés\Egyszeru.bmp"
AK BITMAP "D:\lazarus\UH feldolgozás és értékelés\Atszelesi.bmp"

I included {$R kitero.rc} under the implementation part of my program. kitero.rc is the .rc file I want to use. I get the following error message:

Error: Error while compiling resources -> Compile with -vd for more details. Check for duplicates.

What can be wrong?

Thank ou in advance!  :)





eljo

  • Sr. Member
  • ****
  • Posts: 408
Re: Problem with .rc file
« Reply #1 on: April 13, 2020, 04:40:18 pm »
sounds like a doublicate resource name. Try to clean up and build your project. Usually that solves it for me.

Davidous

  • Jr. Member
  • **
  • Posts: 75
Re: Problem with .rc file
« Reply #2 on: April 14, 2020, 07:02:02 pm »
Thank you for your suggestion! :)
Sadly, it didn't solve my problem, I get the same error message.

jamie

  • Hero Member
  • *****
  • Posts: 3526
Re: Problem with .rc file
« Reply #3 on: April 14, 2020, 10:44:46 pm »
You need to check all of your files for duplicates..

If you have a *.res file that was previously created from a *.rc then beware that in many places you have this {R *.res) that will include it that too..

 So if you compiler links in all of the *.Res it finds and then it finds what you have here with your RC the contents of which may already be there..

 So you need to check all of your source files for duplicated entries and the use of {$ *.RES}
The only true wisdom is knowing you know nothing

Davidous

  • Jr. Member
  • **
  • Posts: 75
Re: Problem with .rc file
« Reply #4 on: April 15, 2020, 10:54:05 am »
I couldn't find any duplicates.

Before this error message I mentioned above, I have the following warnings:

Warning: windres [option(s)] [input-file] [output-file]
Warning: windres: supported targets: pe-i386 pei-i386 elf32-i386 elf32-little elf32-big srec symbolsrec verilog tekhex binary ihex

Davidous

  • Jr. Member
  • **
  • Posts: 75
Re: Problem with .rc file
« Reply #5 on: April 15, 2020, 11:21:39 am »
I found a solution.
I deleted the accented chars from the project folder name and replaced the spaces with "_".
The interesting thing is, that I had no such problem earlier...

Cyrax

  • Hero Member
  • *****
  • Posts: 832
Re: Problem with .rc file
« Reply #6 on: April 15, 2020, 01:30:59 pm »
If you feel a bit adventurous, you might want to test this small patch attached in this bug report : https://bugs.freepascal.org/view.php?id=36526

 

TinyPortal © 2005-2018