Hello,
I am trying to build the demo project for C++. With C++14 and C++ 17 the projects are building.
I have tried to build the software with version 2018.3 and with the newest version 2021.3.
I have changed the setting in the properties for the project:
Configuration properties
--> Generial
--> C++ Language Standard (ISO C++20 Standard (/std:c++ 20)
But with C++20 the projects are not building. See below for the output for the project RandomReads:
Severity Code Description Project File Line Suppression State
Error C2059 syntax error: '||' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14554
Error C2059 syntax error: ')' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14554
Error C2059 syntax error: '||' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14557
Error C2059 syntax error: ')' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14557
Error C2059 syntax error: '||' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14567
Error C2059 syntax error: ')' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14567
Error C2059 syntax error: '||' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14570
Error C2059 syntax error: ')' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14570
Error C2059 syntax error: '||' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tli 2296
Error C2059 syntax error: ')' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tli 2296
Error C2059 syntax error: '||' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tli 2302
Error C2059 syntax error: ')' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tli 2302
Error C2143 syntax error: missing ')' before '||' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14554
Error C2143 syntax error: missing ';' before '||' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14554
Error C2143 syntax error: missing ')' before '||' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14557
Error C2143 syntax error: missing ';' before '||' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14557
Error C2143 syntax error: missing ')' before '||' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14567
Error C2143 syntax error: missing ';' before '||' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14567
Error C2143 syntax error: missing ')' before '||' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14570
Error C2143 syntax error: missing ';' before '||' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14570
Error C2143 syntax error: missing ')' before '||' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tli 2296
Error C2143 syntax error: missing ';' before '||' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tli 2296
Error C2143 syntax error: missing ';' before '{' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tli 2296
Error C2143 syntax error: missing ')' before '||' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tli 2302
Error C2143 syntax error: missing ';' before '||' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tli 2302
Error C2143 syntax error: missing ';' before '{' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tli 2302
Error C2238 unexpected token(s) preceding ';' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14554
Error C2238 unexpected token(s) preceding ';' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14557
Error C2238 unexpected token(s) preceding ';' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14567
Error C2238 unexpected token(s) preceding ';' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14570
Error C2447 '{': missing function header (old-style formal list?) RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tli 2296
Error C2447 '{': missing function header (old-style formal list?) RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tli 2302
Error C2761 'HRESULT mscorlib::ITrackingHandler::MarshaledObject(const _variant_t &,mscorlib::_ObjRef *)': redeclaration of member is not allowed RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tli 2296
Error C2761 'HRESULT mscorlib::ITrackingHandler::UnmarshaledObject(const _variant_t &,mscorlib::_ObjRef *)': redeclaration of member is not allowed RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tli 2302
So is it possible to create/build projects with C++ 20?
I am trying to build the demo project for C++. With C++14 and C++ 17 the projects are building.
I have tried to build the software with version 2018.3 and with the newest version 2021.3.
I have changed the setting in the properties for the project:
Configuration properties
--> Generial
--> C++ Language Standard (ISO C++20 Standard (/std:c++ 20)
But with C++20 the projects are not building. See below for the output for the project RandomReads:
Severity Code Description Project File Line Suppression State
Error C2059 syntax error: '||' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14554
Error C2059 syntax error: ')' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14554
Error C2059 syntax error: '||' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14557
Error C2059 syntax error: ')' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14557
Error C2059 syntax error: '||' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14567
Error C2059 syntax error: ')' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14567
Error C2059 syntax error: '||' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14570
Error C2059 syntax error: ')' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14570
Error C2059 syntax error: '||' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tli 2296
Error C2059 syntax error: ')' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tli 2296
Error C2059 syntax error: '||' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tli 2302
Error C2059 syntax error: ')' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tli 2302
Error C2143 syntax error: missing ')' before '||' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14554
Error C2143 syntax error: missing ';' before '||' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14554
Error C2143 syntax error: missing ')' before '||' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14557
Error C2143 syntax error: missing ';' before '||' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14557
Error C2143 syntax error: missing ')' before '||' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14567
Error C2143 syntax error: missing ';' before '||' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14567
Error C2143 syntax error: missing ')' before '||' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14570
Error C2143 syntax error: missing ';' before '||' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14570
Error C2143 syntax error: missing ')' before '||' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tli 2296
Error C2143 syntax error: missing ';' before '||' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tli 2296
Error C2143 syntax error: missing ';' before '{' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tli 2296
Error C2143 syntax error: missing ')' before '||' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tli 2302
Error C2143 syntax error: missing ';' before '||' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tli 2302
Error C2143 syntax error: missing ';' before '{' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tli 2302
Error C2238 unexpected token(s) preceding ';' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14554
Error C2238 unexpected token(s) preceding ';' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14557
Error C2238 unexpected token(s) preceding ';' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14567
Error C2238 unexpected token(s) preceding ';' RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tlh 14570
Error C2447 '{': missing function header (old-style formal list?) RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tli 2296
Error C2447 '{': missing function header (old-style formal list?) RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tli 2302
Error C2761 'HRESULT mscorlib::ITrackingHandler::MarshaledObject(const _variant_t &,mscorlib::_ObjRef *)': redeclaration of member is not allowed RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tli 2296
Error C2761 'HRESULT mscorlib::ITrackingHandler::UnmarshaledObject(const _variant_t &,mscorlib::_ObjRef *)': redeclaration of member is not allowed RandomReads C:\Program Files (x86)\OPC Labs QuickOPC 2021.3\Examples-COM\CPP\VS2019\Win32\RandomReads\x64\Debug\mscorlib.tli 2302
So is it possible to create/build projects with C++ 20?