Start New Discussion within our Software Development Community

Hi all,

Am building a WinAPI project in Code::blocks and MinGW. I Downloaded some opensource source code, and tried to compile the snippet haveing done nothing to it, and I get Syntax Error on line 6 for the following code:


    POPUP "File"
            MENUITEM "New",                        IDM_NEW
            MENUITEM "Open",                       IDM_OPEN
            MENUITEM "Save",                       IDM_SAVE
            MENUITEM "Exit",                       IDM_EXIT
    POPUP "&Options"
            MENUITEM "&Show Toolbar",               ID_OPTIONS_SHOWTOOLBAR
            , CHECKED

If needed I could try to find the link to the entire program source I've downloaded. What stumps me as that I have done nothing to the code yet :S

Thanks for all of your help,

You have to compile that with a resource compiler, not a c++ compiler. What filename did you give that code? It needs to have .rc extension.

yes, it is named english.rc, do I need to do something seperately then as I was under the impression Code::blocks did it automatically?

Thanks Ancient Dragon

The problem is that all those macris the rc file are not defined. Create a file named english.h and define them there. It doesn't matter what numbers you assign to them as long as there are no duplicates.

// english.h
#define IDM_NEW 1
#define IDM_OPEN 2
#define IDM_SAVE 3
#define IDM_EXIT 100

Then include english.h at the top of english.rc

#include "resource.h"

    POPUP "File"
// rest of the rc file goes here

Thanks Ancient Dragon, worked like a breeze!!
Now to deal with the next set of errors lol ;)

This article has been dead for over six months. Start a new discussion instead.