Author Topic: Problem with resource files  (Read 6543 times)

br3z3l

  • Guest
Problem with resource files
« on: April 30, 2006, 02:01:17 pm »
I know that this problem is asked some times ago in the forum, but i didn't find a solution for my problem either. I want to add some resources to my console application, such as a icon, so Windows shows this icon in explorer. But when i add a *.rc file to my project, it always says:

Quote
Compiling: icon.rc
gcc: icon.rc: No such file or directory
gcc: warning: `-x c' after last input file has no effect
gcc: no input files

windres.exe: no resources
Process terminated with status 1 (0 minutes, 0 seconds)

1 errors, 1 warnings

The resource file i am using looks like this:
Code
Application ICON DISCARDABLE "auido.ico"

The icon "auido.ico" is placed in the same folder as the project file is placed (in my case: N:\xaudio).

if have also added
  N:\xaudio
  N:\xaudio\.objs
to Project's Build options\Directories\Resource compiler, but it always has the same error when i add the *.rc file. Without the resource file i can compile it without any problems or warnings. I have also stopped my AV while compiling the resources (I have read this anywhere here), but still no effect at all.

I'm using
Quote
C::B 1.0rc2
Build: Oct 24 2005, 23:49:28 - wx2.6.1 (Windows, ANSI)

(I hope i get qualified answers, and not something like: use the forum search, because i have searched already this forum 8))

cprgmswr2

  • Guest
Re: Problem with resource files
« Reply #1 on: April 30, 2006, 02:30:10 pm »
Just a couple of questions.
   1) Did you add the icon.rc to your project file?
   2) Is the resource file in the same directory as project file?

If your compiling it from the consule the code should look something like this:
   windres -o resfile.o icon.rc

Then make sure when you link all the files that you include resfile.o
« Last Edit: April 30, 2006, 02:32:36 pm by cprgmswr2 »

Offline kkez

  • Almost regular
  • **
  • Posts: 153
    • WinapiZone
Re: Problem with resource files
« Reply #2 on: April 30, 2006, 09:15:26 pm »
First, your question doesn't seems to be related to C::B, so the answer would rather be "Go ask to the mingw forum"  :D

Now, first get a more recent (nightly) build. Then, go to Settings->Compiler & Debugger->"Other" tab->"Compiler logging" combobox->select "Full command line". Finally repost the compiler output.

br3z3l

  • Guest
Re: Problem with resource files
« Reply #3 on: May 07, 2006, 02:48:12 pm »
Quote
Just a couple of questions.
   1) Did you add the icon.rc to your project file?
   2) Is the resource file in the same directory as project file?

If your compiling it from the consule the code should look something like this:
   windres -o resfile.o icon.rc

Then make sure when you link all the files that you include resfile.o

1) yes, I have added icon.rc to my project file
2) yes, also the icon is in the same direcotry


Quote
First, your question doesn't seems to be related to C::B, so the answer would rather be "Go ask to the mingw forum"  Very Happy

Now, first get a more recent (nightly) build. Then, go to Settings->Compiler & Debugger->"Other" tab->"Compiler logging" combobox->select "Full command line". Finally repost the compiler output.

OK, i have now Build 3 March 06, but same problem

Quote
-------------- Build: server in xaudio server ---------------
mingw32-g++.exe  -IC:\work\codeblocks\include -Ihotkey -IN:\xaudio\ -c hotkey\globalhotkeys.cpp -o .\hotkey\globalhotkeys.o
mingw32-g++.exe  -IC:\work\codeblocks\include -Iipc -IN:\xaudio\ -c ipc\npClient.cpp -o .\ipc\npClient.o
mingw32-g++.exe  -IC:\work\codeblocks\include -Iipc -IN:\xaudio\ -c ipc\npServer.cpp -o .\ipc\npServer.o
mingw32-g++.exe  -IC:\work\codeblocks\include  -IN:\xaudio\ -c main.cpp -o .\main.o
windres.exe -i res.rc -J rc -o .\res.res -O coff -IC:\work\codeblocks\include -IN:\xaudio  -IN:\xaudio\
mingw32-g++.exe  -IC:\work\codeblocks\include  -IN:\xaudio\ -c cbass.cpp -o .\cbass.o
gcc: res.rc: No such file or directory
gcc: warning: `-x c' after last input file has no effect
gcc: no input files
windres.exe: no resources
Process terminated with status 1 (0 minutes, 6 seconds)
1 errors, 1 warnings
 
Process terminated with status 0 (0 minutes, 1 seconds)
1 errors, 1 warnings