User forums > Using Code::Blocks

Icon-Problem

(1/2) > >>

scratsch:

Hello,
i tryed to set a Icon for my Projekt in DevC++.
I found this Quote in the Board:


--- Quote ---The first icon in your resource file will be used as the icon of the executable. You'll have to create your resource file manually though, AFAIK Code::Blocks does not have a dialog for it like Dev-cpp. It's not extremely hard, just put something like this in it:
Code:

MY_ICON ICON "my_icon.ico"

The first word is the name of the icon (not important unless you want to refer to it in your code), the second word indicates it's an icon and then comes the name of the file to use.
--- End quote ---

Bat it doesn't work! The Compiler output is a preprocessing fail?
Here are my Steps:

1. I create a Empty Projekt in Code::Blocks and saved it and add a main.cpp (Simple Hello World)
2. I try to compile - Works!
3. I created a ico.rc and put this in: MY_ICON ICON "test.ico"
4. I put the test.ico in my Projekt-Folder
5. I add the ico.rc in my Code-Blocks Projekt
6. I try to compile - Error!

What's wrong?
// Sorry if my Englisch is not Perfect ;)

MortenMacFly:

--- Quote from: scratsch on August 09, 2009, 01:17:17 am ---6. I try to compile - Error!

--- End quote ---
What error? There can be ~1000 reasons what could fail. Mind providing at least the build log, platform, version (C::B, Compiler) etc? See my sig how to enable the full build log.

scratsch:
C:\Users\Teyhouse\DOCUME~1\TEST-P~1\Icon2\ico.rc|1|warning: no newline at end of file|
||preprocessing failed.|
||=== Build finished: 1 errors, 1 warnings ===|

Code::Blocks 8.02

Jenna:

--- Quote from: MortenMacFly on August 09, 2009, 09:29:09 am ---
--- Quote from: scratsch on August 09, 2009, 01:17:17 am ---6. I try to compile - Error!

--- End quote ---
What error? There can be ~1000 reasons what could fail. Mind providing at least the build log, platform, version (C::B, Compiler) etc? See my sig how to enable the full build log.

--- End quote ---

Do what MortenMacFly writes and enable full commandline logging.

scratsch:
How?

Navigation

[0] Message Index

[#] Next page

Go to full version