Skip to content

Instantly share code, notes, and snippets.

@sawaYch
Last active October 14, 2018 21:42
Show Gist options
  • Save sawaYch/eb103f7a7d974d4cc5081ae710e3182c to your computer and use it in GitHub Desktop.
Save sawaYch/eb103f7a7d974d4cc5081ae710e3182c to your computer and use it in GitHub Desktop.
How to create an exe ico res file (M$Win)

Create .ico

Make .rc file

...with the content like this:
A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "./hc05.ico"

Compile it

windres -i ./res.rc --input-format=rc -o icon.res -O coff

Link the .res file with your program

g++ -o ./Blutool05.exe -std=c++11 ./src/main.cc ./resources/icon.res $(pkg-config gtkmm-3.0 --cflags --libs | sed 's/ -I/ -isystem /g') -mwindows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment