For Code::Blocks with GNU GCC Compiler
Create a New Project... and choose a Console application.
This will give you a default "main.cpp" that simply prints "Hello world!".
Find or create an icon to represent your application. Add it to your project. Mine is named "spiffomatic.ico" .
Create a new file in your project named "resources.rc" . It doesn't have to be named "resources".
Add the following line to "resources.rc" :
PHP Code:
MAINICON ICON "spiffomatic.ico"
Quelle: daniweb