How to provide a C ++ program with an icon?

How do I configure a program in C ++? I am compiling with g ++ on Ubuntu 11.10.

+6
source share
3 answers

On Linux, executables do not have icons. You need to create a .desktop file that you can give an icon. See here for example.

On Windows, you can use resource files to give the files themselves an icon. See here and especially here for an explanation.

+10
source

In addition to what rubenvb and Joe McGrath have already said, note that with Windows the icon of the file that you want to display as the default application icon should appear first (i.e. before any other icons) in the resource file.

+2
source

On Windows, you can include the icon in the executable yourself. There are programs that add resources to a file. This is not a compiler that adds resources.

On Linux, this is not done in the executable itself. There was an earlier answer to here

+1
source

Source: https://habr.com/ru/post/900384/


All Articles