Author Topic: Icon-Problem  (Read 4800 times)

Offline scratsch

  • Single posting newcomer
  • *
  • Posts: 4
Icon-Problem
« on: August 09, 2009, 01:17:17 am »

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.

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 ;)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Icon-Problem
« Reply #1 on: August 09, 2009, 09:29:09 am »
6. I try to compile - Error!
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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline scratsch

  • Single posting newcomer
  • *
  • Posts: 4
Re: Icon-Problem
« Reply #2 on: August 09, 2009, 12:28:01 pm »
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

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Icon-Problem
« Reply #3 on: August 09, 2009, 12:38:14 pm »
6. I try to compile - Error!
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.

Do what MortenMacFly writes and enable full commandline logging.
« Last Edit: August 09, 2009, 12:53:34 pm by jens »

Offline scratsch

  • Single posting newcomer
  • *
  • Posts: 4
Re: Icon-Problem
« Reply #4 on: August 09, 2009, 12:59:06 pm »
How?

mariocup

  • Guest
Re: Icon-Problem
« Reply #5 on: August 09, 2009, 02:22:29 pm »
Go to the menu Settings->Compiler and debugger and select your compiler from the drop down choice "selected compiler". After that switch to the tab "other settings" and choose the entry "Full command line" from the drop down list in the choice compiler logging.


Offline scratsch

  • Single posting newcomer
  • *
  • Posts: 4
Re: Icon-Problem
« Reply #6 on: August 09, 2009, 02:37:39 pm »
Ok i do, bat it's the same output:

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 ===|

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Icon-Problem
« Reply #7 on: August 09, 2009, 02:49:19 pm »
Ok i do, bat it's the same output:

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 ===|

You should learn to read more exactly:
1. MortenMacFly asked you to look into his sig, there he describes how to change to full commandline output
2. he asked you to send the build log's content, you send the content of the build messages.