Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: gugarc on February 08, 2009, 07:14:18 pm

Title: compiling and linking resources (.rc , .res) - Gentoo Linux
Post by: gugarc on February 08, 2009, 07:14:18 pm
Hi,...
I ve a running project with some bitmap buttons (loading images from a subdir ...).
Now i want to load them from a resource.

First i wrote the RC file:

#include "resource.h"
IDB_BITMAP     BITMAP     ".\\images\\image.bmp"

the resource.h file:
#define IDB_BITMAP 101

i have the following toolchain executables defined on Codeblocks (running on Gentoo)
" C Compiler      = gcc
  C++ Compiler =  g++
  Linker for static libs = ar
  Resource compiler = wrc (it was blank after installation of codeblocks, then i changed to wrc because it
      is  the unique resource compiler i found on my machine).
  Make program = make "

After trying to build the project i get following error (the .res was generated but could not be linked to the executable ...) :
" Linking executable: bin/Debug/MyApp
obj/Debug/MyApp.res: file not recognized: File format not recognized "

no idea what else i could do ...
Every suggestion or idea welcome.

thks.
Title: Re: compiling and linking resources (.rc , .res) - Gentoo Linux
Post by: Ceniza on February 08, 2009, 07:36:26 pm
Resource files are Windows only.
Title: Re: compiling and linking resources (.rc , .res) - Gentoo Linux
Post by: Jenna on February 08, 2009, 07:37:44 pm
Resource files are Windows only.

Quote
wrc - Wine Resource Compiler
.
.
.
wrc compiles resources from inputfile into win16 and win32 compatible binary format.

quote from wrc man page