How do I give my C++ program an icon? I'm compiling using g++ on Ubuntu 11.10.
On Linux, executables don't have icons. You need to create a .desktop
file which 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.
In addition to what rubenvb and Joe McGrath have already said, note that with Windows, the icon you want to show up as the application's default icon must occur first (i.e. before any other icons) in the resource file.
On Windows you can include the icon in the executable yourself. There are programs that add resources to the file. It is not the compiler that adds the resources.
On Linux it is not done in the executable itself. Was answered previously at here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With