How can I define a program icon for a Linux application.
For Windows I have made a rc-file that includes the MAINICON and compiled it to a res-file. Is there a similar approach for Linux?
No, the concept of having a icon inside the executable to discribe it does not exist under Linux.
Try opening with konqueror or another graphical file manager your /usr/bin directory. All executables have the same icon.
What people do on Linux is distribute a icon image separated from the executable, and use that icon when creating shortcuts to the program, like a shortcut on the K Menu, for example.
Creating shortcuts is a big problem, because this is a Distribution-dependent task. On each distro this is done in a different way.