User forums > General (but related to Code::Blocks)
Resource compiler
Newbie0815:
If I add an .rc file to my C::B application, I can include images into the .exe, like this
ID_icon_main ICON "icon_main.ico"
but as soon as I try to do anything else, like creating a dialog, I get all kinds of error, mostly syntax eror.
Elsewhere on the web I found out, that´s because I need a resource compiler for that, including tons of notes, of how to compile an .rc with various resource compilers at the command line.
What I would need is a "translation", where and how the commands go into the C:B settings, so that "Build" will do the same as
g++ -c hello.cpp
windres resfile.rc
g++ -o hello.exe hello.o resfile.o -mwindows
Unter settings - compiler and debugger ... - toolchain executables, I´ve set the resource compiler to windres.exe, but it looks like that´s not enough.
stahta01:
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F
OS Name and Version?
Compiler name and Version?
Tim S.
Newbie0815:
Let´s see,
I´ve started some years ago on WinXP with the all in one package from the C::B downloads, I think that was C::B 1.02, including MinGW/GCC 3.something.
Later I´ve updated my system to Vista, some C::B nightly including MinGW/GCC 4.something.
Recently I´ve updated to Win7 64bit, the latest C::B nightly, MinGW64/GCC 4.6
Right now I´m running ALL of the above in VirtualPC´s PLUS twice Ubuntu in 32bit and 64bit with GCC 4.5
The problem is identical in ALL of these.
I can compile at the command line without problems, but I´m missing where and how I have to put the command line options into the C::B settings.
stahta01:
The output of your full build log is?
Newbie0815:
I´ve cut down the code to the minimum, just 2 files
main.cpp
--- Code: ---int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR szCmdLine,int nCmdShow)
{
return 0;
}
--- End code ---
resource.rc
--- Code: ---IDR_MYMENU MENU
BEGIN
POPUP "&File"
BEGIN
MENUITEM "&Exit", ID_FILE_EXIT
END
END
--- End code ---
The complete output I get is
resource.rc line 5 syntax error
Navigation
[0] Message Index
[#] Next page
Go to full version