2
votes

I tried to build a project in XE2. That was building correctly in Delphi XE , but on XE2 i have an error.

THis file appears and i have an error on the ICON

This vrc file ends with theese lines:

MAINICON ICON "Project1_Icon1.ico"

PLATFORMTARGETS RCDATA {1}

I have error on MAINICON ICON.

If i delete this line all is fine.

Could you explain me why I see this file and how to solve the problem?

Note: My colleagues don'ìt have this problem, instead they have a wizard to upgradw the project from XE to XE2. And they don't hav the vrc file

2
Do you have got at least update 3? QC#97454 reports a problem with double quotes in vrc files (which has been resolved in update 3), though the .vrc it mentions is a version info resource.Sertac Akyuz
You could manually edit the .vrc file and remove the quotes. Perhaps that's the problem. Personally I never let the IDE manage resource files because there are always troubles like this.David Heffernan
Yes I use Resources and IDE together, it's a new feature of 2009 and quite handy since I don' t have to compile resouces on prebuild events anymore.LaBracca
@DavidHeffernan if you post your comment as answer i will accept itLaBracca
I don't really think that comment is really a great answer to the question. If you want to write it as an answer and accept it, then be my guest!David Heffernan

2 Answers

2
votes

I have solved the problem with to open the project (.dproj) in notepad++ and i've search after MAINICON. Then I delete the line '< Icon_MainIcon> Project1_Icon1.ico < /Icon_MainIcon>'

2
votes

To fix this same error in XE3 I re-loaded the icon.

In the Delphi IDE:

  • go to Project -> Options, you may get error messages about the missing Icon. I ignored them.

  • Click on "Application" in the tree

  • Click "Load Icon.." and re-choose the icon.

I was then able to run the program. After running the program the .vrc file is no longer in my project folder.

Note: You'll get the same Icon error when switching between Release and Debug mode. Just re-load the Icon for both modes.

See Delphi 7 to Delphi XE2 .res file issue for more info.

I'm not a fan of Delphi, and don't have much experience with it, so I can't explain why this happens.