none
Known Issue: error MIDL2025 : [msg]syntax error [context]: expecting a declarator or * near ")" (Windows 10 1803 SDK (17134), April 2018 release.) RRS feed

  • Question

  • When compiling my existing project that I updated to build 10.0.17134.0 of the SDK, I am now getting a syntax error:

    MIDL2025 : [msg]syntax error [context]: expecting a declarator or * near ")" 

    Monday, April 30, 2018 6:47 PM
    Moderator

Answers

  • As a part of the "modernizing IDL" effort, several new keywords are added to the midlrt tool. These new keywords will cause build breaks if they are encountered in IDL files.
    The new keywords are:
    ·         event
    ·         set
    ·         get
    ·         partial
    ·         unsealed
    ·         overridable
    ·         protected
    ·         importwinmd
    If any of these keywords is used as an identifier, it will generate a build failure indicating a syntax error.
    The error will be similar to:
         <path>\MyFile.idl(12) : error MIDL2025 : [msg]syntax error [context]: expecting a declarator or * near ")"

    To fix this, modify the identifier in error to an "@" prefix in front of the identifier. That will cause MIDL to treat the offending element as an identifier instead of a keyword.

    Monday, April 30, 2018 6:49 PM
    Moderator