Recent

Author Topic: DUPLICATE RESOURCE FOUND: MAINICON:ICO  (Read 12070 times)

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1204
    • Burdjia
DUPLICATE RESOURCE FOUND: MAINICON:ICO
« on: December 09, 2009, 09:08:01 pm »
If I set an icon to the application then I run the application application from the IDE it doesn't fail, but if I try to run it from console or the file selector, it raises an exception:
Code: [Select]
~$ ./example
[WARNING] Out of OEM specific VK codes, changing to unassigned
[WARNING] Out of unassigned VK codes, assigning $FF
TLResourceList.Sort 35 DUPLICATE RESOURCE FOUND: MAINICON:ICO
~$

The example.rc file:
Code: [Select]
#define RT_MANIFEST  24
#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1
#define ISOLATIONAWARE_MANIFEST_RESOURCE_ID 2
#define ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID 3

CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "example.manifest"
MAINICON ICON "example.ico"

Why? %)
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

Leledumbo

  • Hero Member
  • *****
  • Posts: 8799
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: DUPLICATE RESOURCE FOUND: MAINICON:ICO
« Reply #1 on: December 10, 2009, 09:29:10 am »
Could you post the content of file having {$R xxx} directive (perhaps the .lpr file)?

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1204
    • Burdjia
Re: DUPLICATE RESOURCE FOUND: MAINICON:ICO
« Reply #2 on: December 10, 2009, 08:02:08 pm »
When I copy the file to post it here, I've found that:

Code: [Select]
{... Blablabla ...}
{$IFDEF WINDOWS}{$R example.rc}{$ENDIF}

BEGIN
  {$I example.lrs}
  Application.Title := 'The Allegro''s Lazarus example';
  {$I example.lrs}
  Application.Initialize;
 {... etc ...}

The "example.lrs" file is duplicated. But why? :(

[edit] I've deleted one of them but still failing outside the IDE (inside it always runs perfect :o ) no matter which line you deletes.[/edit]

By the way, I should modify the "Title" value since it can't deal with the tilde in "Allegro's": it wrote "Allegro'0s" instead of "Allegro''s".

I was looking for a bug report but I have no idea about how the bug-tracker works.
« Last Edit: December 10, 2009, 08:15:25 pm by Ñuño_Martínez »
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1204
    • Burdjia
Re: DUPLICATE RESOURCE FOUND: MAINICON:ICO
« Reply #3 on: December 14, 2009, 12:14:52 pm »
Hi again.

Finally I've fixed it modifying the .lpr file by hand.

By the way I think there's a bug somewhere in the "Project Options" when modifying the .lpr file or so but I'm not sure. How to be sure?

As I've said I tried to look in the Bugtracker but I have no idea about how does it work and I'm confused. :-[
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

Paul Ishenin

  • Sr. Member
  • ****
  • Posts: 274
Re: DUPLICATE RESOURCE FOUND: MAINICON:ICO
« Reply #4 on: December 24, 2009, 03:24:22 am »
Read the next article:
http://wiki.lazarus.freepascal.org/How_do_I_create_a_bug_report

Don't forget to describe exact steps to reproduce the bug if you will report something.

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1204
    • Burdjia
Re: DUPLICATE RESOURCE FOUND: MAINICON:ICO
« Reply #5 on: December 24, 2009, 09:54:55 am »
Thanks.

BTW, I'm trying to reproduce the problem in a different simpler project. Once I can "find" it I'll report it.
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

 

TinyPortal © 2005-2018