MySQL Forums
Forum List  »  Connector/C++

VS2017: Compiler Errors of xdevapi.h header files
Posted by: William Bosacker
Date: February 25, 2019 08:06PM

I have into an issue upgrading the connector from version 1.0 in a legacy system of ours. Any code file that has:


#include <mysqlx/xdevapi.h>


Will result in the following compiler errors:


3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(81): error C2059: syntax error: 'string'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(83): error C2143: syntax error: missing ';' before '}'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(83): error C2238: unexpected token(s) preceding ';'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(99): error C2065: 'Option_impl': undeclared identifier
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(99): error C2146: syntax error: missing ')' before identifier 'opt'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(120): error C2059: syntax error: 'protected'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(123): error C2065: 'Option_impl': undeclared identifier
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(123): error C2923: 'std::pair': 'Option_impl' is not a valid template type argument for parameter '_Ty1'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(125): error C3203: 'pair': unspecialized class template can't be used as a template argument for template parameter '_Ty', expected a real type
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(131): error C2059: syntax error: 'public'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(137): error C2065: 'Option_impl': undeclared identifier
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(137): error C2143: syntax error: missing ';' before 'const'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(137): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(137): warning C4091: ' ': ignored on left of 'const int' when no variable is declared
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(138): error C2065: 'Option_impl': undeclared identifier
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(138): error C2143: syntax error: missing ';' before 'const'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(138): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(138): warning C4091: ' ': ignored on left of 'const int' when no variable is declared
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(140): error C2270: 'has_option': modifiers not allowed on nonmember functions
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(140): error C2365: 'mysqlx::common::has_option': redefinition; previous definition was 'data variable'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(137): note: see declaration of 'mysqlx::common::has_option'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(141): error C2270: 'get': modifiers not allowed on nonmember functions
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(141): error C2365: 'mysqlx::common::get': redefinition; previous definition was 'data variable'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(138): note: see declaration of 'mysqlx::common::get'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(147): error C2270: 'begin': modifiers not allowed on nonmember functions
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(148): error C2065: 'm_data': undeclared identifier
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(152): error C2270: 'end': modifiers not allowed on nonmember functions
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(153): error C2065: 'm_data': undeclared identifier
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(161): error C2065: 'Option_impl': undeclared identifier
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(161): error C2182: 'erase': illegal use of type 'void'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(162): error C2365: 'mysqlx::common::erase': redefinition; previous definition was 'data variable'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(161): note: see declaration of 'mysqlx::common::erase'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(199): error C2059: syntax error: 'protected'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(214): error C2061: syntax error: identifier 'Option_impl'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(228): error C2653: 'Settings_impl': is not a class or namespace name
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(228): error C2065: 'Option_impl': undeclared identifier
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(228): error C2146: syntax error: missing ')' before identifier 'opt'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(229): error C2143: syntax error: missing ';' before '{'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(229): error C2447: '{': missing function header (old-style formal list?)
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(246): error C2653: 'Settings_impl': is not a class or namespace name
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(246): error C2065: 'Client_option_impl': undeclared identifier
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(246): error C2146: syntax error: missing ')' before identifier 'opt'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(247): error C2143: syntax error: missing ';' before '{'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(247): error C2447: '{': missing function header (old-style formal list?)
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(260): error C2653: 'Settings_impl': is not a class or namespace name
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(260): error C2065: 'SSL_mode': undeclared identifier
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(260): error C2146: syntax error: missing ')' before identifier 'mode'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(261): error C2143: syntax error: missing ';' before '{'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(261): error C2447: '{': missing function header (old-style formal list?)
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(271): error C2653: 'Settings_impl': is not a class or namespace name
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(271): error C2065: 'Auth_method': undeclared identifier
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(271): error C2146: syntax error: missing ')' before identifier 'method'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(272): error C2143: syntax error: missing ';' before '{'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(272): error C2447: '{': missing function header (old-style formal list?)
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(287): error C2653: 'Settings_impl': is not a class or namespace name
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(287): error C2065: 'Option_impl': undeclared identifier
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(287): error C2146: syntax error: missing ')' before identifier 'opt'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(288): error C2143: syntax error: missing ';' before '{'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(288): error C2447: '{': missing function header (old-style formal list?)
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(304): error C2653: 'Settings_impl': is not a class or namespace name
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(304): error C2065: 'Client_option_impl': undeclared identifier
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(304): error C2146: syntax error: missing ')' before identifier 'opt'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(305): error C2143: syntax error: missing ';' before '{'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(305): error C2447: '{': missing function header (old-style formal list?)
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(318): error C2653: 'Settings_impl': is not a class or namespace name
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(318): error C2065: 'Option_impl': undeclared identifier
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(318): error C2146: syntax error: missing ')' before identifier 'opt'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(319): error C2143: syntax error: missing ';' before '{'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(319): error C2447: '{': missing function header (old-style formal list?)
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(328): error C2653: 'Settings_impl': is not a class or namespace name
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(328): error C2065: 'Client_option_impl': undeclared identifier
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(328): error C2146: syntax error: missing ')' before identifier 'opt'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(329): error C2143: syntax error: missing ';' before '{'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(329): error C2447: '{': missing function header (old-style formal list?)
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(334): error C2653: 'Settings_impl': is not a class or namespace name
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(334): error C2065: 'Option_impl': undeclared identifier
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(334): error C2146: syntax error: missing ')' before identifier 'opt'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(335): error C2143: syntax error: missing ';' before '{'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(335): error C2447: '{': missing function header (old-style formal list?)
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(340): error C2653: 'Settings_impl': is not a class or namespace name
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(340): error C2065: 'Client_option_impl': undeclared identifier
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(340): error C2146: syntax error: missing ')' before identifier 'opt'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(341): error C2143: syntax error: missing ';' before '{'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(341): error C2447: '{': missing function header (old-style formal list?)
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(351): error C2653: 'Settings_impl': is not a class or namespace name
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(351): error C2065: 'Option_impl': undeclared identifier
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(351): error C2146: syntax error: missing ')' before identifier 'opt'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(352): error C2143: syntax error: missing ';' before '{'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(352): error C2447: '{': missing function header (old-style formal list?)
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(392): error C2653: 'Settings_impl': is not a class or namespace name
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(392): error C2065: 'Client_option_impl': undeclared identifier
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(392): error C2146: syntax error: missing ')' before identifier 'opt'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(393): error C2143: syntax error: missing ';' before '{'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(393): error C2447: '{': missing function header (old-style formal list?)
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(398): error C2059: syntax error: '}'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\common\settings.h(398): error C2143: syntax error: missing ';' before '}'
3>c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\assert.h(14): error C2143: syntax error: missing ';' before '{'
3>c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\assert.h(14): error C2447: '{': missing function header (old-style formal list?)
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\devapi\detail\settings.h(148): error C2061: syntax error: identifier 'Client_option_impl'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\devapi\detail\settings.h(296): note: see reference to class template instantiation 'mysqlx::internal::Settings_detail<Traits>' being compiled
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\devapi\detail\settings.h(169): warning C4346: 'std::is_convertible<V,int>::value': dependent name is not a type
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\devapi\detail\settings.h(169): note: prefix with 'typename' to indicate a type
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\devapi\detail\settings.h(169): error C2061: syntax error: identifier 'Client_option_impl'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\devapi\detail\settings.h(202): error C2061: syntax error: identifier 'Client_option_impl'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\devapi\detail\settings.h(214): error C3646: 'int_to_client_option': unknown override specifier
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\devapi\detail\settings.h(214): error C2062: type 'int' unexpected
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\devapi\detail\settings.h(215): error C2334: unexpected token(s) preceding '{'; skipping apparent function body
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\devapi\settings.h(107): error C2059: syntax error: 'string'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\devapi\settings.h(109): error C2143: syntax error: missing ';' before '}'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\devapi\settings.h(116): error C2065: 'SessionOption': undeclared identifier
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\devapi\settings.h(116): error C2146: syntax error: missing ')' before identifier 'opt'
3>[PRIVATE]\thirdparty\mysql-connector-c++-8.0.15-winx64\include\mysqlx\devapi\settings.h(116): fatal error C1003: error count exceeds 100; stopping compilation



Does anyone know why this is occurring?

Options: ReplyQuote


Subject
Views
Written By
Posted
VS2017: Compiler Errors of xdevapi.h header files
1592
February 25, 2019 08:06PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.