News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

changing the icon

Started by bijan311, February 01, 2010, 05:54:14 AM

Previous topic - Next topic

bijan311

I changed an icon of one of my programs compiled in code blocks using a program, but when i compiled it again, it reverted to the default icon. Is there a way to fix this?

MortenMacFly

Quote from: bijan311 on February 01, 2010, 05:54:14 AM
Is there a way to fix this?
Yes, use the resource compiler to embed the icon into your application directly. Assuming your are using MinGW/GCC 4 on Windows (you did not tell anything about your configuration) you have to create a resource file (RC) and embed the icon as *.ico file naming it in a  way it will e the very first resource (e.g. "AAAIcon"). Make sure the icon has proper size, consult resource handling articles accordingly (we don't provide support for teaching how to do that). You can have a look how Code::Blocks does that assuming your are using wxWidgets.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]