Menu

Resouce syntax error

Anubis208
2008-01-21
2012-09-26
  • Anubis208

    Anubis208 - 2008-01-21

    Windows XP
    Dev-cpp 4.9.9.2

    Compiler: Default compiler
    Building Makefile: "C:\Mycppstuff\sockets\chatter\Makefile.win"
    Executing make clean
    rm -f main.o chatter_private.res chatter.exe

    g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"

    windres.exe -i chatter_private.rc --input-format=rc -o chatter_private.res -O coff

    windres.exe: Untitled1.rc:34: syntax error

    make.exe: *** [chatter_private.res] Error 1

    Execution terminated

    include <windows.h>

    include "main.h"

    IDR_MENU MENU
    BEGIN
    POPUP "&File"
    BEGIN
    MENUITEM "E&xit", IDR_EXIT
    END
    POPUP "C&onnect"
    BEGIN
    MENUITEM "&Connect", IDR_CONNECT
    MENUITEM "&Host", IDR_HOST
    END
    POPUP "Hel&p"
    BEGIN
    MENUITEM "&About", IDR_ABOUT
    END
    END

    DLG_CONNECT DIALOG 0, 0, 190, 150
    STYLE DS_MODALFRAME|WS_POPUP|WS_CAPTION|WS_SYSMENU
    CAPTION "Connect"
    FONT 8,"MS Sans Serif"
    BEGIN
    CONTROL "Hi", IDD_SUBA, "BUTTON", WS_CHILD|WS_VISIBLE, 30, 40, 30, 15
    CONTROL "IP Address:", 0, "STATIC", WS_CHILD|WS_VISIBLE, 10, 10, 40, 10
    CONTROL "", IDD_IP, "EDIT", WS_CHILD|WS_VISIBLE, 50, 10, 60, 10
    CONTROL "Port Number:", 0, WS_CHILD|WS_VISIBLE, 10, 20, 43, 10
    CONTROL "", IDD_PORTA, "EDIT", WS_CHILD|WS_VISIBLE, 50, 20, 30, 10
    END

    When I delete the line where the error occurs, an error occurs on the same line number (which would then be: END). Could someone tell me how to fix this error.

     
    • cpns

      cpns - 2008-01-21

      The message says the error is in line 34, you posted only 31 lines - give us a clue!

      An invalidly defined macro in main.h perhaps?

       
    • Anubis208

      Anubis208 - 2008-01-21

      Here is the code in main.h

      define IDR_MENU 101

      define IDR_EXIT 102

      define IDR_CONNECT 103

      define IDR_HOST 104

      define IDR_ABOUT 105

      define IDC_MSGS 106

      define IDC_MSG 107

      define IDC_SENDMSG 108

      define DLG_CONNECT 109

      define IDD_IP 111

      define IDD_PORTA 112

      define IDD_SUBA 113

      define DLG_HOST 110

      define IDD_PORTB 114

      define IDD_SUBB 115

      It highlights line 30:
      CONTROL "", IDD_PORTA, "EDIT", WS_CHILD|WS_VISIBLE, 50, 20, 30, 10

       
    • cpns

      cpns - 2008-01-21

      The following line is ill formed:

      CONTROL "Port Number:", 0, WS_CHILD|WS_VISIBLE, 10, 20, 43, 10

      It has no 'class' name.

      http://msdn2.microsoft.com/en-us/library/aa380911(VS.85).aspx

      Clifford

       
    • BiT

      BiT - 2008-01-21

      stop posting bits of it and post the whole thing (the RC file)

      you said it highlights line 34(original post)

      Tell me something.....

      Have you provided anything even close to 34 lines for us to see. Sorry but my crystal ball is in the shop atm and I am unable to read minds today.

      read the second post in this thread it clearly states what you need to provide to get help.

      from your original post
      windres.exe: Untitled1.rc:34: syntax error

      Have yet to see what is in your RC file at line 34..........

      if I sound cranky it is because I am trying to stop smoking and I am a bit on edge!

       
    • Anubis208

      Anubis208 - 2008-01-21

      Thanks, the ill formed line was causing the problem.

      @BiT My original post contained the entire .rc file. It is only 32 lines long.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.