gpt4 book ai didi

c++ - 使用Catboost C评估库API

转载 作者:行者123 更新时间:2023-12-02 10:15:22 27 4
gpt4 key购买 nike

我想使用https://catboost.ai/docs/concepts/c-plus-plus-api_dynamic-c-pluplus-wrapper.html中提到的C Catboost API。此页面的第一步说:

Link the required library (libcatboostmodel.so|dll|dylib).



我完全不知道该如何进行。有人可以帮我解决这个可能琐碎的疑问吗?逐步方法将是首选。

第一步,我自己还无法制作共享库(libcatboostmodel.so | dll | dylib)。执行Makefile( make -f make/model_interface.CLANG50-LINUX-X86_64.makefile)时,出现以下错误:

mkdir -p '/home/CPUser/CPP/catboost/catboost/libs/helpers'
/usr/bin/clang++ --target=x86_64-linux-gnu -c -o '/home/CPUser/CPP/catboost/catboost/libs/helpers/array_subset.cpp.pic.o' '/home/CPUser/CPP/catboost/catboost/libs/helpers/array_subset.cpp' '-I/home/CPUser/CPP/catboost' '-I/home/CPUser/CPP/catboost' '-I/home/CPUser/CPP/catboost/contrib/libs/linux-headers' '-I/home/CPUser/CPP/catboost/contrib/libs/linux-headers/_nf' '-I/home/CPUser/CPP/catboost/contrib/libs/cxxsupp/libcxx/include' '-I/home/CPUser/CPP/catboost/contrib/libs/cxxsupp/libcxxrt' '-I/home/CPUser/CPP/catboost/contrib/libs/zlib/include' '-I/home/CPUser/CPP/catboost/contrib/libs/double-conversion/include' '-fdebug-prefix-map=/home/CPUser/CPP/catboost=/-B' -Xclang -fdebug-compilation-dir -Xclang /tmp -pipe -m64 -O3 -g -ggnu-pubnames -fexceptions -fuse-init-array -W -Wall -Wno-parentheses -DFAKEID=5020880 '-DARCADIA_ROOT=/home/CPUser/CPP/catboost' '-DARCADIA_BUILD_ROOT=/home/CPUser/CPP/catboost' -D_THREAD_SAFE -D_PTHREADS -D_REENTRANT -D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DNDEBUG -D__LONG_LONG_SUPPORTED -DSSE_ENABLED=1 -DSSE3_ENABLED=1 -DSSSE3_ENABLED=1 -DSSE41_ENABLED=1 -DSSE42_ENABLED=1 -DPOPCNT_ENABLED=1 -DCX16_ENABLED=1 -DCATBOOST_OPENSOURCE=yes -D_libunwind_ -nostdinc++ -fPIC -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mpopcnt -mcx16 -fPIC -std=c++1z -Woverloaded-virtual -Wno-invalid-offsetof -Wno-attributes -Wno-dynamic-exception-spec -Wno-register -Wimport-preprocessor-directive-pedantic -Wno-c++17-extensions -Wno-exceptions -Wno-inconsistent-missing-override -Wno-undefined-var-template -Wno-return-std-move -DCATBOOST_OPENSOURCE=yes -nostdinc++
warning: unknown warning option '-Wno-dynamic-exception-spec'; did you mean '-Wno-missing-exception-spec'? [-Wunknown-warning-option]
warning: unknown warning option '-Wno-c++17-extensions' [-Wunknown-warning-option]
warning: unknown warning option '-Wno-undefined-var-template'; did you mean '-Wno-undefined-internal'? [-Wunknown-warning-option]
warning: unknown warning option '-Wno-return-std-move' [-Wunknown-warning-option]
In file included from /home/CPUser/CPP/catboost/catboost/libs/helpers/array_subset.cpp:1:
In file included from /home/CPUser/CPP/catboost/catboost/libs/helpers/array_subset.h:4:
In file included from /home/CPUser/CPP/catboost/catboost/libs/helpers/dynamic_iterator.h:3:
In file included from /home/CPUser/CPP/catboost/catboost/private/libs/index_range/index_range.h:9:
In file included from /home/CPUser/CPP/catboost/library/cpp/binsaver/bin_saver.h:13:
In file included from /home/CPUser/CPP/catboost/util/generic/variant.h:28:
/home/CPUser/CPP/catboost/contrib/libs/cxxsupp/libcxx/include/variant:1146:27: error: expected ';' after using declaration
using _Bases::operator()...;
^
/home/CPUser/CPP/catboost/contrib/libs/cxxsupp/libcxx/include/variant:1146:9: error: using declaration contains unexpanded parameter pack '_Bases'
using _Bases::operator()...;
^
In file included from /home/CPUser/CPP/catboost/catboost/libs/helpers/array_subset.cpp:1:
In file included from /home/CPUser/CPP/catboost/catboost/libs/helpers/array_subset.h:4:
In file included from /home/CPUser/CPP/catboost/catboost/libs/helpers/dynamic_iterator.h:3:
In file included from /home/CPUser/CPP/catboost/catboost/private/libs/index_range/index_range.h:9:
/home/CPUser/CPP/catboost/library/cpp/binsaver/bin_saver.h:446:16: error: expected '(' after 'if'
if constexpr (sizeof...(TTail) == 0) {
^
/home/CPUser/CPP/catboost/library/cpp/binsaver/bin_saver.h:445:35: warning: unused parameter 'binSaver' [-Wunused-parameter]
static void Do(IBinSaver& binSaver, ui32 typeIndex, TVariantClass* pData) {
^
/home/CPUser/CPP/catboost/library/cpp/binsaver/bin_saver.h:445:50: warning: unused parameter 'typeIndex' [-Wunused-parameter]
static void Do(IBinSaver& binSaver, ui32 typeIndex, TVariantClass* pData) {
^
/home/CPUser/CPP/catboost/library/cpp/binsaver/bin_saver.h:445:76: warning: unused parameter 'pData' [-Wunused-parameter]
static void Do(IBinSaver& binSaver, ui32 typeIndex, TVariantClass* pData) {
^
In file included from /home/CPUser/CPP/catboost/catboost/libs/helpers/array_subset.cpp:1:
In file included from /home/CPUser/CPP/catboost/catboost/libs/helpers/array_subset.h:7:
/home/CPUser/CPP/catboost/catboost/libs/helpers/maybe_owning_array_holder.h:161:12: error: expected '(' after 'if'
if constexpr (std::is_same_v<std::remove_const_t<TDst>, TSrc>) {
^
/home/CPUser/CPP/catboost/catboost/libs/helpers/maybe_owning_array_holder.h:160:95: warning: unused parameter 'src' [-Wunused-parameter]
TMaybeOwningArrayHolder<TDst> CreateOwningWithMaybeTypeCast(TMaybeOwningArrayHolder<TSrc> src) {
^
8 warnings and 4 errors generated.
make/model_interface.CLANG7-LINUX-X86_64.makefile:197: recipe for target '/home/CPUser/CPP/catboost/catboost/libs/helpers/array_subset.cpp.pic.o' failed
make: *** [/home/CPUser/CPP/catboost/catboost/libs/helpers/array_subset.cpp.pic.o] Error 1

最佳答案

使用Clang 9可以解决问题

关于c++ - 使用Catboost C评估库API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62175175/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com