yuanrongxi/revolver

VS2015 编译出错

Closed this issue · 1 comments

flhcd commented

编译rudp:
1>d:\download\revolver-master\revolver-master\common\rudp\rudp_send_buffer.cpp(150): error C2065: 'now_timer': undeclared identifier
1>d:\download\revolver-master\revolver-master\common\rudp\rudp_send_buffer.cpp(151): error C2065: 'now_timer': undeclared identifier

编译core:
1>d:\download\revolver-master\revolver-master\common\rudp\rudp_packet.h(280): warning C4267: 'initializing': conversion from 'size_t' to 'uint16_t', possible loss of data
1>d:\download\revolver-master\revolver-master\common\rudp\rudp_send_buffer.cpp(150): error C2065: 'now_timer': undeclared identifier
1>d:\download\revolver-master\revolver-master\common\rudp\rudp_send_buffer.cpp(151): error C2065: 'now_timer': undeclared identifier
1>d:\download\revolver-master\revolver-master\common\rudp\rudp_send_buffer.cpp(201): warning C4018: '>': signed/unsigned mismatch
1>d:\download\revolver-master\revolver-master\common\rudp\rudp_send_buffer.cpp(238): warning C4244: '=': conversion from 'uint64_t' to 'uint32_t', possible loss of data
2>------ Build started: Project: core, Configuration: Debug Win32 ------
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(367,5): warning MSB8004: Intermediate Directory does not end with a trailing slash. This build instance will add the slash as it is required to allow proper evaluation of the Intermediate Directory.
2> core_message_processor.cpp
2>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\hash_map(17): error C2338: <hash_map> is deprecated and will be REMOVED. Please use <unordered_map>. You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning.
2> core_message_map_decl.cpp
2>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\hash_map(17): error C2338: <hash_map> is deprecated and will be REMOVED. Please use <unordered_map>. You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning.
2> core_frame.cpp
2>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\hash_map(17): error C2338: <hash_map> is deprecated and will be REMOVED. Please use <unordered_map>. You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning.
2> core_dc_client.cpp
2>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\hash_map(17): error C2338: <hash_map> is deprecated and will be REMOVED. Please use <unordered_map>. You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning.
2> core_daemon_client.cpp
2>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\hash_map(17): error C2338: <hash_map> is deprecated and will be REMOVED. Please use <unordered_map>. You can define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS to acknowledge that you have received this warning.
2> core_connection.cpp
2>..\core\core_connection.cpp : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
2>..\core\core_connection.cpp(163): error C3613: missing return type after '->' ('int' assumed)
2>..\core\core_connection.cpp(163): error C3646: 'add_tcp_packet': unknown override specifier
2>..\core\core_connection.cpp(163): error C3551: if a trailing return type is used then the leading return type shall be the single type-specifier 'auto' (not 'int')
2>..\core\core_connection.cpp(163): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
2>..\core\core_connection.cpp(163): error C2556: 'int CSingletonBASEOBJECT::CoreThrottler::instance(void)': overloaded function differs only by return type from 'BASEOBJECT::CoreThrottler *CSingletonBASEOBJECT::CoreThrottler::instance(void)'
2> D:\Download\revolver-master\revolver-master\common\revolver/base_singleton.h(11): note: see declaration of 'CSingletonBASEOBJECT::CoreThrottler::instance'
2>..\core\core_connection.cpp(163): error C2040: 'CSingletonBASEOBJECT::CoreThrottler::instance': 'int (void)' differs in levels of indirection from 'BASEOBJECT::CoreThrottler *(void)'
2>..\core\core_connection.cpp(163): error C2888: 'BASEOBJECT::CoreThrottler *CSingletonBASEOBJECT::CoreThrottler::instance(void)': symbol cannot be defined within namespace 'BASEOBJECT'
2>..\core\core_connection.cpp(163): error C2059: syntax error: '('
2>..\core\core_connection.cpp(165): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
2>..\core\core_connection.cpp(167): error C2059: syntax error: 'if'
2>..\core\core_connection.cpp(168): error C2143: syntax error: missing ';' before '{'
2>..\core\core_connection.cpp(168): error C2447: '{': missing function header (old-style formal list?)
2>..\core\core_connection.cpp(187): error C2059: syntax error: 'if'
2>..\core\core_connection.cpp(187): error C2143: syntax error: missing ';' before '{'
2>..\core\core_connection.cpp(187): error C2447: '{': missing function header (old-style formal list?)
2>..\core\core_connection.cpp(189): error C2059: syntax error: 'return'
2>..\core\core_connection.cpp(193): error C2601: 'BASEOBJECT::CConnection::send': local function definitions are illegal
2>..\core\core_connection.cpp(212): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
2>..\core\core_connection.cpp(214): error C3613: missing return type after '->' ('int' assumed)
2>..\core\core_connection.cpp(214): error C3646: 'add_tcp_packet': unknown override specifier
2>..\core\core_connection.cpp(214): error C3551: if a trailing return type is used then the leading return type shall be the single type-specifier 'auto' (not 'int')
2>..\core\core_connection.cpp(214): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
2>..\core\core_connection.cpp(214): error C2556: 'int CSingletonBASEOBJECT::CoreThrottler::instance(void)': overloaded function differs only by return type from 'BASEOBJECT::CoreThrottler *CSingletonBASEOBJECT::CoreThrottler::instance(void)'
2> ..\core\core_connection.cpp(163): note: see declaration of 'CSingletonBASEOBJECT::CoreThrottler::instance'
2>..\core\core_connection.cpp(214): error C2040: 'CSingletonBASEOBJECT::CoreThrottler::instance': 'int (void)' differs in levels of indirection from 'BASEOBJECT::CoreThrottler *(void)'
2>..\core\core_connection.cpp(214): error C2143: syntax error: missing ')' before ','
2>..\core\core_connection.cpp(214): error C2059: syntax error: 'constant'
2>..\core\core_connection.cpp(214): error C2059: syntax error: ')'
2>..\core\core_connection.cpp(216): error C2059: syntax error: 'if'
2>..\core\core_connection.cpp(217): error C2143: syntax error: missing ';' before '{'
2>..\core\core_connection.cpp(217): error C2447: '{': missing function header (old-style formal list?)
2>..\core\core_connection.cpp(228): error C2059: syntax error: 'return'
2>..\core\core_connection.cpp(229): error C2059: syntax error: '}'
2>..\core\core_connection.cpp(229): error C2143: syntax error: missing ';' before '}'
2>..\core\core_connection.cpp(232): error C2143: syntax error: missing ';' before '{'
2>..\core\core_connection.cpp(232): error C2447: '{': missing function header (old-style formal list?)
2>..\core\core_connection.cpp(265): error C2601: 'BASEOBJECT::CConnection::set_timer': local function definitions are illegal
2>..\core\core_connection.cpp(274): error C2601: 'BASEOBJECT::CConnection::cancel_timer': local function definitions are illegal
2>..\core\core_connection.cpp(289): error C2601: 'BASEOBJECT::CConnection::release_timer_act': local function definitions are illegal
2>..\core\core_connection.cpp(298): error C2601: 'BASEOBJECT::CConnection::handle_timeout': local function definitions are illegal
2>..\core\core_connection.cpp(343): error C2601: 'BASEOBJECT::CConnection::handle_exception': local function definitions are illegal
2>..\core\core_connection.cpp(367): error C2601: 'BASEOBJECT::CConnection::handle_close': local function definitions are illegal
2>..\core\core_connection.cpp(391): error C2601: 'BASEOBJECT::CConnection::handle_input': local function definitions are illegal
2>..\core\core_connection.cpp(468): error C2601: 'BASEOBJECT::CConnection::handle_output': local function definitions are illegal
2>..\core\core_connection.cpp(494): error C2601: 'BASEOBJECT::CConnection::check_connecting_state': local function definitions are illegal
2>..\core\core_connection.cpp(624): error C2601: 'BASEOBJECT::CConnection::buffer_reduce': local function definitions are illegal
2>..\core\core_connection.cpp(639): error C2601: 'BASEOBJECT::CConnection::send_ping': local function definitions are illegal
2>..\core\core_connection.cpp(650): error C2601: 'BASEOBJECT::CConnection::send_handshake': local function definitions are illegal
2>..\core\core_connection.cpp(665): error C2601: 'BASEOBJECT::CConnection::generate_digest': local function definitions are illegal
2>..\core\core_connection.cpp(683): error C2059: syntax error: '}'
2>..\core\core_connection.cpp(683): error C2143: syntax error: missing ';' before '}'

the vs projects are built under vs2013, we don't try it with vs2015, pls try vs2013