This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to interpret compiler error message?

Hello, I'm getting following error message:

compiling RTX_Config.c...
C:\Keil\ARM\RV31\INC\RTX_lib.c(185): error: #29: expected an expression

I'm using Keil uVision V4.71.2.0 tools. C compier Armcc.Exe version v5.03.0.69

Is the error in filename RTX_Config.c, line number 185?

Parents
  • Filename RTX_lib.c has the #if condition as follows:

    #if (__ARM__ && __RTA_RTX_CONFIG) // error is "expected an expression"

    Filename RTX_Config.c has the following definition:

    #define __RTA_RTX_CONFIG

    Now, this error makes sense. Since __RTA_RTX_CONFIG is empty, there is no expression.
    But I cannot understand how RTX_lib.c knows about __RTA_RTX_CONFIG because it's defined
    in a different .c file?

Reply
  • Filename RTX_lib.c has the #if condition as follows:

    #if (__ARM__ && __RTA_RTX_CONFIG) // error is "expected an expression"

    Filename RTX_Config.c has the following definition:

    #define __RTA_RTX_CONFIG

    Now, this error makes sense. Since __RTA_RTX_CONFIG is empty, there is no expression.
    But I cannot understand how RTX_lib.c knows about __RTA_RTX_CONFIG because it's defined
    in a different .c file?

Children