Skip to content

MSVC 2022 compile error #647

Open
Open
@hexabyte23

Description

Hi all,

Trying to compile C++ protobuf classes with MSVC 2022 Community, get this :

....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1299): error C2143: syntax error: missing ')' before 'constant'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1299): error C2143: syntax error: missing ';' before 'constant'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1299): error C2789: 'meshtastic::ModuleConfig_SerialConfig::DWORD': an object of const-qualified type must be initialized
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1299): note: see declaration of 'meshtastic::ModuleConfig_SerialConfig::DWORD'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1299): error C2059: syntax error: ')'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1299): error C2238: unexpected token(s) preceding ';'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1300): error C2143: syntax error: missing ')' before 'constant'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1300): error C2143: syntax error: missing ';' before 'constant'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1300): error C2737: 'meshtastic::ModuleConfig_SerialConfig::DWORD': constexpr object must be initialized
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1300): error C2789: 'meshtastic::ModuleConfig_SerialConfig::DWORD': an object of const-qualified type must be initialized
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1300): note: see declaration of 'meshtastic::ModuleConfig_SerialConfig::DWORD'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1300): error C2059: syntax error: ')'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1300): error C2238: unexpected token(s) preceding ';'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1301): error C2143: syntax error: missing ')' before 'constant'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1301): error C2143: syntax error: missing ';' before 'constant'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1301): error C2737: 'meshtastic::ModuleConfig_SerialConfig::DWORD': constexpr object must be initialized
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1301): error C2789: 'meshtastic::ModuleConfig_SerialConfig::DWORD': an object of const-qualified type must be initialized
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1301): note: see declaration of 'meshtastic::ModuleConfig_SerialConfig::DWORD'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1301): error C2059: syntax error: ')'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1301): error C2238: unexpected token(s) preceding ';'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1302): error C2143: syntax error: missing ')' before 'constant'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1302): error C2143: syntax error: missing ';' before 'constant'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1302): error C2737: 'meshtastic::ModuleConfig_SerialConfig::DWORD': constexpr object must be initialized
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1302): error C2789: 'meshtastic::ModuleConfig_SerialConfig::DWORD': an object of const-qualified type must be initialized
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1302): note: see declaration of 'meshtastic::ModuleConfig_SerialConfig::DWORD'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1302): error C2059: syntax error: ')'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1302): error C2238: unexpected token(s) preceding ';'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1303): error C2143: syntax error: missing ')' before 'constant'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1303): error C2143: syntax error: missing ';' before 'constant'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1303): error C2737: 'meshtastic::ModuleConfig_SerialConfig::DWORD': constexpr object must be initialized
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1303): error C2789: 'meshtastic::ModuleConfig_SerialConfig::DWORD': an object of const-qualified type must be initialized
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1303): note: see declaration of 'meshtastic::ModuleConfig_SerialConfig::DWORD'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1303): error C2059: syntax error: ')'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1303): error C2238: unexpected token(s) preceding ';'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1304): error C2143: syntax error: missing ')' before 'constant'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1304): error C2143: syntax error: missing ';' before 'constant'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1304): error C2737: 'meshtastic::ModuleConfig_SerialConfig::DWORD': constexpr object must be initialized
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1304): error C2789: 'meshtastic::ModuleConfig_SerialConfig::DWORD': an object of const-qualified type must be initialized
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1304): note: see declaration of 'meshtastic::ModuleConfig_SerialConfig::DWORD'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1304): error C2059: syntax error: ')'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1304): error C2238: unexpected token(s) preceding ';'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1305): error C2143: syntax error: missing ')' before 'constant'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1305): error C2143: syntax error: missing ';' before 'constant'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1305): error C2737: 'meshtastic::ModuleConfig_SerialConfig::DWORD': constexpr object must be initialized
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1305): error C2789: 'meshtastic::ModuleConfig_SerialConfig::DWORD': an object of const-qualified type must be initialized
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1305): note: see declaration of 'meshtastic::ModuleConfig_SerialConfig::DWORD'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1305): error C2059: syntax error: ')'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1305): error C2238: unexpected token(s) preceding ';'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1306): error C2143: syntax error: missing ')' before 'constant'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1306): error C2143: syntax error: missing ';' before 'constant'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1306): error C2737: 'meshtastic::ModuleConfig_SerialConfig::DWORD': constexpr object must be initialized
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1306): error C2789: 'meshtastic::ModuleConfig_SerialConfig::DWORD': an object of const-qualified type must be initialized
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1306): note: see declaration of 'meshtastic::ModuleConfig_SerialConfig::DWORD'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1306): error C2059: syntax error: ')'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1306): error C2238: unexpected token(s) preceding ';'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1307): error C2143: syntax error: missing ')' before 'constant'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1307): error C2143: syntax error: missing ';' before 'constant'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1307): error C2737: 'meshtastic::ModuleConfig_SerialConfig::DWORD': constexpr object must be initialized
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1307): error C2789: 'meshtastic::ModuleConfig_SerialConfig::DWORD': an object of const-qualified type must be initialized
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1307): note: see declaration of 'meshtastic::ModuleConfig_SerialConfig::DWORD'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1307): error C2059: syntax error: ')'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1307): error C2238: unexpected token(s) preceding ';'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1308): error C2143: syntax error: missing ')' before 'constant'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1308): error C2143: syntax error: missing ';' before 'constant'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1308): error C2737: 'meshtastic::ModuleConfig_SerialConfig::DWORD': constexpr object must be initialized
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1308): error C2789: 'meshtastic::ModuleConfig_SerialConfig::DWORD': an object of const-qualified type must be initialized
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1308): note: see declaration of 'meshtastic::ModuleConfig_SerialConfig::DWORD'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1308): error C2059: syntax error: ')'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1308): error C2238: unexpected token(s) preceding ';'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1309): error C2143: syntax error: missing ')' before 'constant'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1309): error C2143: syntax error: missing ';' before 'constant'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1309): error C2737: 'meshtastic::ModuleConfig_SerialConfig::DWORD': constexpr object must be initialized
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1309): error C2789: 'meshtastic::ModuleConfig_SerialConfig::DWORD': an object of const-qualified type must be initialized
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1309): note: see declaration of 'meshtastic::ModuleConfig_SerialConfig::DWORD'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1309): error C2059: syntax error: ')'
....\thirdparty\Meshtastic\generated\meshtastic/module_config.pb.h(1309): error C2238: unexpected token(s) preceding ';'

Missing some compiler flags ?

Thanks

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions