Задать вопрос
@blueberries2016

Что делать если при компиляции возникла ошибка с Boost?

В процессе компиляции возникла ошибка, которая не позволяет закончить процесс, и это при том, что в Linux данный код отлично компилируется и работает. Для Windows использую MSYS2. Как можно устранить эту ошибку и скомпилировать код?
[ 80%] Building CXX object src/wallet/CMakeFiles/obj_wallet.dir/api/wallet.cpp.obj
In file included from C:/Users/User/Desktop/BlackRoseCoin/src/serialization/crypto.h:37,
                 from C:/Users/User/Desktop/BlackRoseCoin/src/cryptonote_core/cryptonote_basic.h:44,
                 from C:/Users/User/Desktop/BlackRoseCoin/src/cryptonote_core/account.h:33,
                 from C:/Users/User/Desktop/BlackRoseCoin/src/wallet/wallet2.h:44,
                 from C:/Users/User/Desktop/BlackRoseCoin/src/wallet/api/wallet.h:36,
                 from C:/Users/User/Desktop/BlackRoseCoin/src/wallet/api/wallet.cpp:33:
C:/Users/User/Desktop/BlackRoseCoin/src/crypto/chacha8.h: In function 'void crypto::generate_chacha8_key(const void*, size_t, crypto::chacha8_key&)':
C:/Users/User/Desktop/BlackRoseCoin/src/crypto/chacha8.h:79:39: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of non-trivially copyable type 'struct crypto::chacha8_key'; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
     memcpy(&key, pwd_hash, sizeof(key));
                                       ^
C:/Users/User/Desktop/BlackRoseCoin/src/crypto/chacha8.h:53:10: note: 'struct crypto::chacha8_key' declared here
   struct chacha8_key {
          ^~~~~~~~~~~
In file included from C:/msys64/mingw64/include/boost/detail/endian.hpp:9,
                 from C:/Users/User/Desktop/BlackRoseCoin/external/boost/archive/portable_binary_archive.hpp:25,
                 from C:/Users/User/Desktop/BlackRoseCoin/external/boost/archive/portable_binary_iarchive.hpp:33,
                 from C:/Users/User/Desktop/BlackRoseCoin/src/cryptonote_core/cryptonote_boost_serialization.h:40,
                 from C:/Users/User/Desktop/BlackRoseCoin/src/cryptonote_core/account_boost_serialization.h:34,
                 from C:/Users/User/Desktop/BlackRoseCoin/src/wallet/wallet2.h:45,
                 from C:/Users/User/Desktop/BlackRoseCoin/src/wallet/api/wallet.h:36,
                 from C:/Users/User/Desktop/BlackRoseCoin/src/wallet/api/wallet.cpp:33:
C:/msys64/mingw64/include/boost/predef/detail/endian_compat.h: At global scope:
C:/msys64/mingw64/include/boost/predef/detail/endian_compat.h:11:161: note: #pragma message: The use of BOOST_*_ENDIAN and BOOST_BYTE_ORDER is deprecated. Please include <boost/predef/other/endian.h> and use BOOST_ENDIAN_*_BYTE instead
 #pragma message("The use of BOOST_*_ENDIAN and BOOST_BYTE_ORDER is deprecated. Please include <boost/predef/other/endian.h> and use BOOST_ENDIAN_*_BYTE instead")
                                                                                                                                                                 ^
C:/Users/User/Desktop/BlackRoseCoin/src/wallet/api/wallet.cpp: In member function 'void Monero::WalletImpl::refreshThreadFunc()':
C:/Users/User/Desktop/BlackRoseCoin/src/wallet/api/wallet.cpp:1165:80: error: no matching function for call to 'boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>::subsecond_duration(std::atomic<int>&)'
             boost::posix_time::milliseconds wait_for_ms(m_refreshIntervalMillis);
                                                                                ^
In file included from C:/msys64/mingw64/include/boost/date_time/posix_time/posix_time_config.hpp:16,
                 from C:/msys64/mingw64/include/boost/date_time/posix_time/posix_time_system.hpp:13,
                 from C:/msys64/mingw64/include/boost/date_time/posix_time/ptime.hpp:12,
                 from C:/msys64/mingw64/include/boost/date_time/posix_time/posix_time_types.hpp:12,
                 from C:/Users/User/Desktop/BlackRoseCoin/external/boost/thread/thread_time.hpp:11,
                 from C:/Users/User/Desktop/BlackRoseCoin/external/boost/thread/win32/thread_data.hpp:10,
                 from C:/Users/User/Desktop/BlackRoseCoin/external/boost/thread/thread_only.hpp:15,
                 from C:/Users/User/Desktop/BlackRoseCoin/external/boost/thread/thread.hpp:12,
                 from C:/Users/User/Desktop/BlackRoseCoin/external/boost/thread.hpp:13,
                 from C:/Users/User/Desktop/BlackRoseCoin/contrib/epee/include/misc_log_ex.h:43,
                 from C:/Users/User/Desktop/BlackRoseCoin/contrib/epee/include/include_base_utils.h:32,
                 from C:/Users/User/Desktop/BlackRoseCoin/src/wallet/wallet2.h:43,
                 from C:/Users/User/Desktop/BlackRoseCoin/src/wallet/api/wallet.h:36,
                 from C:/Users/User/Desktop/BlackRoseCoin/src/wallet/api/wallet.cpp:33:
C:/msys64/mingw64/include/boost/date_time/time_duration.hpp:285:14: note: candidate: 'template<class T> boost::date_time::subsecond_duration<base_duration, frac_of_second>::subsecond_duration(const T&, typename boost::enable_if<boost::is_integral<Functor>, void>::type*)'
     explicit subsecond_duration(T const& ss,
              ^~~~~~~~~~~~~~~~~~
C:/msys64/mingw64/include/boost/date_time/time_duration.hpp:285:14: note:   template argument deduction/substitution failed:
C:/msys64/mingw64/include/boost/date_time/time_duration.hpp: In substitution of 'template<class T> boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>::subsecond_duration(const T&, typename boost::enable_if<boost::is_integral<T> >::type*) [with T = std::atomic<int>]':
C:/Users/User/Desktop/BlackRoseCoin/src/wallet/api/wallet.cpp:1165:80:   required from here
C:/msys64/mingw64/include/boost/date_time/time_duration.hpp:285:14: error: no type named 'type' in 'struct boost::enable_if<boost::is_integral<std::atomic<int> >, void>'
In file included from C:/msys64/mingw64/include/boost/date_time/posix_time/posix_time_config.hpp:16,
                 from C:/msys64/mingw64/include/boost/date_time/posix_time/posix_time_system.hpp:13,
                 from C:/msys64/mingw64/include/boost/date_time/posix_time/ptime.hpp:12,
                 from C:/msys64/mingw64/include/boost/date_time/posix_time/posix_time_types.hpp:12,
                 from C:/Users/User/Desktop/BlackRoseCoin/external/boost/thread/thread_time.hpp:11,
                 from C:/Users/User/Desktop/BlackRoseCoin/external/boost/thread/win32/thread_data.hpp:10,
                 from C:/Users/User/Desktop/BlackRoseCoin/external/boost/thread/thread_only.hpp:15,
                 from C:/Users/User/Desktop/BlackRoseCoin/external/boost/thread/thread.hpp:12,
                 from C:/Users/User/Desktop/BlackRoseCoin/external/boost/thread.hpp:13,
                 from C:/Users/User/Desktop/BlackRoseCoin/contrib/epee/include/misc_log_ex.h:43,
                 from C:/Users/User/Desktop/BlackRoseCoin/contrib/epee/include/include_base_utils.h:32,
                 from C:/Users/User/Desktop/BlackRoseCoin/src/wallet/wallet2.h:43,
                 from C:/Users/User/Desktop/BlackRoseCoin/src/wallet/api/wallet.h:36,
                 from C:/Users/User/Desktop/BlackRoseCoin/src/wallet/api/wallet.cpp:33:
C:/msys64/mingw64/include/boost/date_time/time_duration.hpp:270:30: note: candidate: 'boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>::subsecond_duration(const boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>&)'
   class BOOST_SYMBOL_VISIBLE subsecond_duration : public base_duration
                              ^~~~~~~~~~~~~~~~~~
C:/msys64/mingw64/include/boost/date_time/time_duration.hpp:270:30: note:   no known conversion for argument 1 from 'std::atomic<int>' to 'const boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>&'
C:/msys64/mingw64/include/boost/date_time/time_duration.hpp:270:30: note: candidate: 'boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>::subsecond_duration(boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>&&)'
C:/msys64/mingw64/include/boost/date_time/time_duration.hpp:270:30: note:   no known conversion for argument 1 from 'std::atomic<int>' to 'boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000>&&'
make[3]: *** [src/wallet/CMakeFiles/obj_wallet.dir/build.make:102: src/wallet/CMakeFiles/obj_wallet.dir/api/wallet.cpp.obj] Ошибка 1
make[3]: выход из каталога «/c/Users/User/Desktop/BlackRoseCoin/build/release»
make[2]: *** [CMakeFiles/Makefile2:1158: src/wallet/CMakeFiles/obj_wallet.dir/all] Ошибка 2
make[2]: выход из каталога «/c/Users/User/Desktop/BlackRoseCoin/build/release»
make[1]: *** [Makefile:129: all] Ошибка 2
make[1]: выход из каталога «/c/Users/User/Desktop/BlackRoseCoin/build/release»
make: *** [Makefile:105: release-static-win64] Ошибка 2
  • Вопрос задан
  • 183 просмотра
Подписаться 1 Простой 6 комментариев
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы