0

I followed everything described here to set an app icon.

Created .rc file / placed it in the same directory where .pro file is.

Added the following line to the .rc file

IDI_ICON1 ICON DISCARDABLE "myappico.ico"

Added the following line to the .pro file

RC_FILE = myapp.rc

Run QMake and run the app and the following error message comes up

:-1: error: error: ..\ZombieAttack\myapp.rc: No such file or directory
:-1: warning: '-x c' after last input file has no effect

What am I doing wrong?

Tim Tuffley
  • 605
  • 1
  • 6
  • 20

1 Answers1

1

Assigning an icon to the application is automated by qmake in Qt5. Just add the following to the project file:

win32:RC_ICONS += myappico.ico
Nejat
  • 31,784
  • 12
  • 106
  • 138
  • That's interesting.. I have added the line above and it now says `:-1: error: error: ..\ZombieAttack\ZombieAttack_resource.rc: No such file or directory` .. However, I have checked the build directory and ZombieAttack_resource.rc file is in it.. :( – Tim Tuffley Sep 07 '14 at 08:00
  • 1
    Remove the .rc file and the related line in .pro. Delete build files and rebuild your project. – Nejat Sep 07 '14 at 08:05
  • Still same thing :( Something I am doing must be wrong but what is it? – Tim Tuffley Sep 07 '14 at 08:17