AshamaneProject / AshamaneCore

AshamaneCore Open Source MMO Framework (master = 9.0.2.36949, bfa = 8.3.7.35284, legion = 7.3.5.26972)
GNU General Public License v2.0
321 stars 357 forks source link

error C2039 #250

Closed NiganNi closed 4 years ago

NiganNi commented 4 years ago

Pure Trinity core compiles without problems, and there is an error on Ashmane:

25> - - - - - - Build started: project: worldserver, Configuration: Release x64 - - - - - -
25>Building Custom Rule C:/Server/AshamaneBfA/src/server/worldserver/CMakeLists.txt
25>Main.cpp
25>C:\local\boost_1_72_0\boost/asio/detail/io_object_impl.hpp(87.1): error C2039: "get_executor": not a member of "boost:: asio:: execution_context".
25>C:\local\boost_1_72_0\boost/asio/execution_context.hpp(106): message : see the ad " boost:: asio::execution_context"
25>C:\local\boost_1_72_0\boost/asio/basic_deadline_timer.hpp(183): message : a reference to an instance of the function template is being compiled "boost::asio::detail::io_object_impl<boost::asio::detail::deadline_timer_service<TimeTraits>,Executor>::io_object_impl<ExecutionContext>(ExecutionContext &, void *)"
25> with
25> [
25> TimeTraits=boost::asio::time_traits<boost::posix_time::ptime>,
25> Executor=boost::asio::executor,
25> ExecutionContext=boost::asio::execution_context
25> ]
25>C:\local\boost_1_72_0\boost/asio/basic_deadline_timer.hpp(182): message : a reference to an instance of the function template is being compiled "boost::asio::detail::io_object_impl<boost::asio::detail::deadline_timer_service<TimeTraits>,Executor>::io_object_impl<ExecutionContext>(ExecutionContext &, void *)"
25> with
25> [
25> TimeTraits=boost::asio::time_traits<boost::posix_time::ptime>,
25> Executor=boost::asio::executor,
25> ExecutionContext=boost::asio::execution_context
25> ]
25>C:\Server\AshamaneBfA\src\server\worldserver\TCRest\server_http.h(255): message: a reference to an instance of the function template is being compiled "boost::asio::basic_deadline_timer<boost::posix_time::ptime,boost::asio::time_traits<boost::posix_time::ptime>,boost::asio::executor>::basic_deadline_timer<boost::asio::execution_context>(ExecutionContext &, void *)"
25> with
25> [
25> ExecutionContext=boost::asio::execution_context
25> ]
25>C:\Server\AshamaneBfA\src\server\worldserver\TCRest\server_http.h(255): message: a reference to an instance of the function template is being compiled "boost::asio::basic_deadline_timer<boost::posix_time::ptime,boost::asio::time_traits<boost::posix_time::ptime>,boost::asio::executor>::basic_deadline_timer<boost::asio::execution_context>(ExecutionContext &, void *)"
25> with
25> [
25> ExecutionContext=boost::asio::execution_context
25> ]
25>C:\Server\AshamaneBfA\src\server\worldserver\TCRest\server_http.h(249): message : during compilation of a member function, the template class "void SimpleWeb:: ServerBase<SimpleWeb:: HTTP>:: Connection:: set_timeout(long) noexcept"
25>C:\Server\AshamaneBfA\src\server\worldserver\TCRest\server_http.h(505): message : a reference to an instance of the "void SimpleWeb::ServerBase<SimpleWeb::HTTP>::Connection::set_timeout(long) noexcept" function is being compiled"
25>C:\Server\AshamaneBfA\src\server\worldserver\TCRest\server_http.h(724): message : a reference to an instance of the "SimpleWeb::ServerBase<SimpleWeb::HTTP>::Connection"function template class is being compiled
25>C:\local\boost_1_72_0\boost/asio/detail/io_object_impl.hpp(87,31): error C2665: boost:: asio:: detail:: io_object_executor<Executor>::io_object_executor: none of the 3 overloads can convert all argument types
25> with
25> [
25> Executor=boost::asio::executor
25> ]
25>C:\local\boost_1_72_0\boost/asio/detail/io_object_executor.hpp(57,3): message : can be "boost::asio::detail::io_object_executor<Executor>::io_object_executor(boost::asio::detail::io_object_executor<Executor> &&) noexcept"
25> with
25> [
25> Executor=boost::asio::executor
25> ]
25>C:\local\boost_1_72_0\boost/asio/detail/io_object_executor.hpp(42,3): message : or "boost:: asio:: detail:: io_object_executor<Executor>::io_object_executor(const boost::asio:: detail:: io_object_executor<Executor>&) noexcept"
25> with
25> [
25> Executor=boost::asio::executor
25> ]
25>C:\local\boost_1_72_0\boost/asio/detail/io_object_executor.hpp(35,3): message : or "boost::asio:: detail:: io_object_executor<Executor>::io_object_executor(const Executor &, bool) noexcept"
25> with
25> [
25> Executor=boost::asio::executor
25> ]
25>C:\local\boost_1_72_0\boost/asio/detail/io_object_impl.hpp(89,1): message : when trying to match the argument list "(const_ty)"
25> with
25> [
25> _Ty=bool
25> ]
25>Building the " worldserver.vcxproj" completed with error.

CMakeCache.txt //The directory containing a CMake configuration file for Boost. Boost_DIR:PATH=Boost_DIR-NOTFOUND

CMake Warning (dev) at CMakeLists.txt:76 (find_package):
  Policy CMP0074 is not set: find_package uses <PackageName>_ROOT variables.
  Run "cmake --help-policy CMP0074" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  Environment variable Boost_ROOT is set to:

    C:/local/boost_1_72_0

  For compatibility, CMake is ignoring the variable.
This warning is for project developers.  Use -Wno-dev to suppress it.

I use: Boost = 1.72 MySQL ≥ 5.6 OpenSSL ≥ 1.1.1g CMake = 3.17.3 MS Visual Studio (Community) = 16.6 (2019)

DuelistRag3 commented 4 years ago

Try to use boost 1_66, i used it before i resetet my pc, now i use also 1_72 but it didn´t worked with 1_72 before, so i switched to 66

DuelistRag3 commented 4 years ago

or try to set boost dir manualy

Daniel25 commented 4 years ago

Try to use boost 1_66, i used it before i resetet my pc, now i use also 1_72 but it didn´t worked with 1_72 before, so i switched to 66

That will work for sure.

NiganNi commented 4 years ago

DuelistRag3 thank you for your help! It really worked, I just didn't try it, but I couldn't think of it! The solution is to put the bost 1_66_0!

To avoid creating separate Issues, tell us which version of the database is better to use. 5.6.30, 5.7 or 10.4.6-MariaDB?

DuelistRag3 commented 4 years ago

I recomend to use Mysql 5.7: https://dev.mysql.com/downloads/installer/ don´t use 8.0, i had problems with it

NiganNi commented 4 years ago

DuelistRag3 thank you friend!