Author Topic: Problem using rc files(Windows)  (Read 5872 times)

Offline Need4sleep

  • Single posting newcomer
  • *
  • Posts: 5
Problem using rc files(Windows)
« on: September 12, 2012, 10:34:35 pm »
Im trying to compile an rc file in code::blocks but im getting some errors. Here's the file:
Code
#include "I:/Win32/Win32_SimpleMenu/resource.h"

IDR_MYMENU MENU
BEGIN
POPUP "&file"
BEGIN
MENUITEM "E&xit", ID_FILE_EXIT
END

POPUP "&Stuff"
BEGIN
MENUITEM "&Go", ID_STUFF_GO
MENUITEM "G&o somewhere else", 0, GRAYED
END
END

IDI_MYICON ICON "menu_one.ico"

the compiler says it is compiling the rc file, but it does nothing. After cancling i get:

can't open file `prompt': No such file or directory|
||preprocessing failed.|
||=== Build finished: 2 errors, 0 warnings ===|

resource.h
Code
#define IDR_MYMENU                      101
#define IDI_MYICON                      102
#define ID_FILE_EXIT                    40001
#define ID_STUFF_GO                     40002
#define ID_STUFF_GOSOMEWHEREELSE        40003

Thanks if you can help!

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Need4sleep

  • Single posting newcomer
  • *
  • Posts: 5
Re: Problem using rc files(Windows)
« Reply #2 on: September 12, 2012, 10:43:35 pm »
I appreiciate the help, it not notes that the process tried to write to a nonexistant pipe. Does that help at all?

EDIT: also says windres.exe is the source that gets the error

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Problem using rc files(Windows)
« Reply #3 on: September 12, 2012, 11:03:26 pm »
Search the forum for a winres.exe, I think this is a common problem.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5930
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Problem using rc files(Windows)
« Reply #4 on: September 21, 2012, 04:51:10 am »
I appreiciate the help, it not notes that the process tried to write to a nonexistant pipe. Does that help at all?

EDIT: also says windres.exe is the source that gets the error
Did you install the mingw compiler suite correctly? What is the error raw log message?
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.