Change App Icon (on the desktop)
-
i ve created an rc file named icon.rc which contains
icon.rc:
#include <windows.h>
IDI_ICON1 ICON DISCARDABLE "MSlogo.ico")the icon.rc file and the image.ico are on the same project directory(where source and header files )
In my Cmake file i got these changes :
set(CMAKE_RC_FLAGS "${CMAKE_RC_FLAGS} -DWin32Icon=IDI_ICON1")
set(app_icon_resource_windows "${CMAKE_CURRENT_SOURCE_DIR}/icon.rc")
add_executable(jarinDenfant3
${PROJECT_SOURCES}
listeeleve.h listeeleve.cpp listeeleve.ui
calendrier.h calendrier.cpp calendrier.ui
payement.cpp payement.h payement.ui
statistique.h statistique.cpp statistique.ui
mainwindow.ui
mainwindow.ui
ajoutsppliment.h ajoutsppliment.cpp ajoutsppliment.ui
visiteprofile.cpp visiteprofile.h visiteprofile.ui
camera.cpp camera.h metadatadialog.cpp metadatadialog.h
camera.ui${app_icon_resource_windows}
)
when i try to run the app i got :-1: error: ninja: build stopped: subcommand failed.
if anyone have an idea how to fix this issue and thanks.
-
@yass1213 said in Change App Icon (on the desktop):
ninja: build stopped: subcommand failed
Please post the actual error. You will find it somewhere above the line you posted.
-
when i try to buid the app i got this output:
C:\Qt2\Tools\mingw1120_64\bin\windres.exe: can't popen `C:\Qt2\Tools\mingw1120_64\bin\gcc -E -xc -DRC_INVOKED -DMINGW_HAS_SECURE_API=1 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_MULTIMEDIAWIDGETS_LIB -DQT_MULTIMEDIA_LIB -DQT_NEEDS_QMAIN -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_SQL_LIB -DQT_WIDGETS_LIB -DUNICODE -DWIN32 -DWIN64 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_UNICODE -D_WIN64
i ve added the C:\Qt2\Tools\mingw1120_64\bin\windres.exe to the PATH but in vain the error persestis
-
@yass1213
First just verify thatC:\Qt2\Tools\mingw1120_64\bin\gcc
does indeed exist.i ve added the C:\Qt2\Tools\mingw1120_64\bin\windres.exe to the PATH but in vain the error persestis
I trust you mean you added just
C:\Qt2\Tools\mingw1120_64\bin
toPATH
.If nobody here knows/gives you an answer, I suggest you Google for
windres.exe: can't popen
This error has popped up occasionally over the years --- going back a decade! --- for installations of MinGW. I'm afarid I think you would have to look through these to see if any apply to your situation.