Adding an icon to an exe

I want to add an icon to the exe of my program, and as far as I can find its basically just create a .rc file with:
 
MAINICON ICON "icon_name.ico"


however the compile fails with the error "bad file descriptor", which I can't find anything relevant about.

I'm using Code::Blocks.
Topic archived. No new replies allowed.