Setting an executable icon

From HaskellWiki
Revision as of 23:13, 7 November 2014 by Henk-Jan van Tuyl (talk | contribs) (Initial page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This article is a stub. You can help by expanding it.


Many operating systems display icons for executables in their file manager windows. The following shows how to add icons to

executables compiled from Haskell source. The examples use the favicon (File:Favicon.ico).


  • Save the favicon as favicon.ico in the directory of your application
  • Create the file Icon.rc, with the contents:

     1 ICON "favicon.ico"

  • generate an object file with the command:

     windres -i Icon.rc Resource.o

  • Compile your Haskell program with a command like:

     ghc Nop.hs Resource.o


A description how to do this in Ubuntu: Create desktop icon executable on Ubuntu Linux