Здравствуйте.
Пытаюсь собрать исполняемый файл из этих (
https://github.com/fireice-uk/xmr-stak-cpu) исходников.
Скачал зависимости hwloc-win64-build-1.11.7, libmicrohttpd-0.9.55-w32-bin, OpenSSL-Win64.
Скачал MinGW-W64 (
https://sourceforge.net/projects/mingw-w64/) и установил с параметрами:
Version: 7.1.0
Architecture: x86_64
Threads: win32
Exceptions: seh
Build revision: 0
Используя Code Bloks 16.01, указав месторасположение зависимостей и компилятора, запустил сборку.
Вышла куча ошибок:
Код:
||=== Build: Debug in xmr-stak-cpu (compiler: GNU GCC Compiler) ===|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\thdq.hpp|47|error: 'mutex' in namespace 'std' does not name a type|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\thdq.hpp|48|error: 'condition_variable' in namespace 'std' does not name a type|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\thdq.hpp||In member function 'T thdq<T>::pop()':|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\thdq.hpp|14|error: 'mutex' is not a member of 'std'|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\thdq.hpp|14|error: 'mutex' is not a member of 'std'|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\thdq.hpp|14|error: template argument 1 is invalid|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\thdq.hpp|14|error: 'mutex_' was not declared in this scope|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\thdq.hpp|14|note: suggested alternative: 'putenv'|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\thdq.hpp|15|error: 'cond_' was not declared in this scope|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\thdq.hpp||In member function 'void thdq<T>::pop(T&)':|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\thdq.hpp|23|error: 'mutex' is not a member of 'std'|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\thdq.hpp|23|error: 'mutex' is not a member of 'std'|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\thdq.hpp|23|error: template argument 1 is invalid|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\thdq.hpp|23|error: 'mutex_' was not declared in this scope|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\thdq.hpp|23|note: suggested alternative: 'putenv'|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\thdq.hpp|24|error: 'cond_' was not declared in this scope|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\thdq.hpp||In member function 'void thdq<T>::push(const T&)':|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\thdq.hpp|31|error: 'mutex' is not a member of 'std'|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\thdq.hpp|31|error: 'mutex' is not a member of 'std'|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\thdq.hpp|31|error: template argument 1 is invalid|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\thdq.hpp|31|error: 'mutex_' was not declared in this scope|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\thdq.hpp|31|note: suggested alternative: 'putenv'|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\thdq.hpp|33|error: request for member 'unlock' in 'mlock', which is of non-class type 'int'|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\thdq.hpp|34|error: 'cond_' was not declared in this scope|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\thdq.hpp||In member function 'void thdq<T>::push(T&&)':|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\thdq.hpp|39|error: 'mutex' is not a member of 'std'|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\thdq.hpp|39|error: 'mutex' is not a member of 'std'|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\thdq.hpp|39|error: template argument 1 is invalid|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\thdq.hpp|39|error: 'mutex_' was not declared in this scope|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\thdq.hpp|39|note: suggested alternative: 'putenv'|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\thdq.hpp|41|error: request for member 'unlock' in 'mlock', which is of non-class type 'int'|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\thdq.hpp|42|error: 'cond_' was not declared in this scope|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\executor.h|51|error: 'mutex' in namespace 'std' does not name a type|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\executor.h|56|error: 'thread' in namespace 'std' does not name a type|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\executor.h|85|error: field 'httpReady' has incomplete type 'std::promise<void>'|
C:\mingw-w64\x86_64-7.1.0-win32-seh-rt_v5-rev0\mingw64\lib\gcc\x86_64-w64-mingw32\7.1.0\include\c++\future|134|note: declaration of 'class std::promise<void>'|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\executor.h|86|error: 'mutex' in namespace 'std' does not name a type|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\executor.h||In member function 'void executor::ex_start()':|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\executor.h|22|error: 'my_thd' was not declared in this scope|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\executor.h|22|note: suggested alternative: 'minethd'|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\executor.h|22|error: expected type-specifier|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\minethd.h|132|error: 'thread' in namespace 'std' does not name a type|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\console.h|40|error: 'mutex' in namespace 'std' does not name a type|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\cli-miner.cpp||In function 'void do_benchmark()':|
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\cli-miner.cpp|190|error: 'std::this_thread' has not been declared|
||=== Build failed: 33 error(s), 0 warning(s) (0 minute(s), 18 second(s)) ===|
На
stackoverflow.com пишут "The MinGW-w64 projects provides the necessary runtime support. Check out http://mingw-w64.sourceforge.net/"
Скачал MinGW-w64 оттуда (
http://win-builds.org/doku.php/downl...n_from_windows), указал в Code Blocks.
При сборке выходит ошибка:
Код:
C:\Users\User\Downloads\xmr-stak-cpu-1.2.0-1.4.1\cli-miner.cpp|1|error: bad value (haswell) for -march= switch|
Как правильно собрать программу?