C++ 英特尔DAAL 2017测试版更新1编译错误
我正在努力使daal在我的项目中工作,现在遇到了以下错误-我正在努力理解它,甚至不确定从哪里开始调试 我正在尝试复制此网站的代码:但在Windows 10中,我有以下软件(与网站完全相同):C++ 英特尔DAAL 2017测试版更新1编译错误,c++,r,visual-c++,intel,intel-dal,C++,R,Visual C++,Intel,Intel Dal,我正在努力使daal在我的项目中工作,现在遇到了以下错误-我正在努力理解它,甚至不确定从哪里开始调试 我正在尝试复制此网站的代码:但在Windows 10中,我有以下软件(与网站完全相同): 英特尔DAAL 2017测试版更新1 R版本3.3.1(头发中的Bug) Rcpp包版本0.12.5 内联包版本0.3.14 e1071包版本1.6-7 我已经做了以下工作: 已将C:\Program Files(x86)\IntelSWTools\compilers\u和\u libraries\u
- 英特尔DAAL 2017测试版更新1
- R版本3.3.1(头发中的Bug)
- Rcpp包版本0.12.5
- 内联包版本0.3.14
- e1071包版本1.6-7
- 已将C:\Program Files(x86)\IntelSWTools\compilers\u和\u libraries\u 2017.1.143\windows\daal\include中的daal包复制到R的include中
- 按照中的说明进行操作
file473877c213b9.cpp: In function 'SEXPREC* file473877c213b9(SEXP, SEXP)':
file473877c213b9.cpp:37:49: error: incomplete universal character name \U
std::string fname = Rcpp::as<std::string>(-"C:\Users\Documents\BAJAJ.csv");
^
file473877c213b9.cpp:37:49: warning: unknown escape sequence: '\D'
file473877c213b9.cpp:37:49: warning: unknown escape sequence: '\B'
file473877c213b9.cpp:37:49: error: wrong type argument to unary minus
file473877c213b9.cpp:38:29: error: no matching function for call to 'as(int)'
int k = Rcpp::as<int>(7);
---------------------------------------------------------------------------------
make: *** [file473877c213b9.o] Error 1
Warning message:
running command 'make -f "C:/R/R-33~1.1/etc/x64/Makeconf" -f "C:/R/R-33~1.1/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="file473877c213b9.dll" WIN=64 TCLBIN=64 OBJECTS="file473877c213b9.o"' had status 2
---------------------------------------------------------------------------------
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! In file included from file3f9022477144.cpp:3:0:
C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.1.143\windows\daal\include\daal.h:25:0: warning: ignoring #pragma warning [-Wunknown-pragmas]
#pragma warning(disable:809)
^
C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.1.143\windows\daal\include\daal.h:38:0: warning: ignoring #pragma comment [-Wunknown-pragmas]
#pragma comment(lib, "tbb.lib" )
^
C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.1.143\windows\daal\include\daal.h:39:0: warning: ignoring #pragma comment [-Wunknown-pragmas]
#pragma comment(lib, "tbbmalloc.lib" )
^
In file included from C:/R/R-33~1.1/include/data_management/data/data_dictionary.h:35:0,
from C:/R/R-33~1.1/include/data_management/data_source/data_source.h:33,
from C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.1.143\windows\daal\in
In addition: Warning message:
running command 'C:/R/R-33~1.1/bin/x64/R CMD SHLIB file3f9022477144.cpp 2> file3f9022477144.cpp.err.txt' had status 1
编辑-2018年7月23日
我按照Ralf的建议对csv路径进行了更改,并在Makevars.win文件中插入了以下内容:
CXX=C:/IntelSWTools2018/compilers_and_libraries_2018.3.210/windows/bin/intel64/icl.exe
CXXFLAGS=-I"C:/IntelSWTools2018/compilers_and_libraries_2018.3.210/windows/daal/include" -I"C:/IntelSWTools2018/compilers_and_libraries_2018.3.210/windows/compiler/include" -I"C:/Program Files (x86)/Windows Kits/10/Include/10.0.10240.0/ucrt" -I"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include
现在,我收到以下错误:
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 18.0.3.210 Build 20180410
Copyright (C) 1985-2018 Intel Corporation. All rights reserved.
icl: NOTE: The evaluation period for this product ends on 4-aug-2018 UTC.
compilation aborted for file35d0134c2a9d.cpp (code 2)
make: *** [file35d0134c2a9d.o] Error 2
Warning message:
running command 'make -f "C:/R/R-33~1.1/etc/x64/Makeconf" -f "C:/R/R-33~1.1/share/make/winshlib.mk" -f "C:/Users/Documents/.R/Makevars.win" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="file35d0134c2a9d.dll" WIN=64 TCLBIN=64 OBJECTS="file35d0134c2a9d.o"' had status 2
In addition: Warning message:
running command 'C:/R/R-33~1.1/bin/x64/R CMD SHLIB file35d0134c2a9d.cpp 2> file35d0134c2a9d.cpp.err.txt' had status 1
我可以看到代码中有几行代码提出了一些问题,但我不能完全理解这些问题:
C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include/xmmintrin.h(61): error #2277: invalid definition of __m128; use #include "xmmintrin.h" instead
C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include/xlocale(341): warning #583: C++ exception handler found but /EHsc option was not specified
C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include/xlocale(367): warning #583: C++ exception handler found but /EHsc option was not specified
C:/Users/Documents/R/win-library/3.3/Rcpp/include/Rcpp/internal/NAComparator.h(62): error: expected a ")"
C:/Users/Documents/R/win-library/3.3/Rcpp/include/Rcpp/r_cast.h(32): warning #583: C++ exception handler found but /EHsc option was not specified
C:/Users/Documents/R/win-library/3.3/Rcpp/include/Rcpp/module/Module_generated_CppFunction.h(53): warning #583: C++ exception handler found but /EHsc option was not specified
C:/Users/Documents/R/win-library/3.3/Rcpp/include/Rcpp/module/Module_generated_CppFunction.h(93): warning #583: C++ exception handler found but /EHsc option was not specified
C:/Users/Documents/R/win-library/3.3/Rcpp/include/Rcpp/api/meat/module/Module.h(40): warning #583: C++ exception handler found but /EHsc option was not specified
C:/Users/Documents/R/win-library/3.3/Rcpp/include/Rcpp/api/meat/module/Module.h(40): warning #583: C++ exception handler found but /EHsc option was not specified
C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include/xstring(2195): warning #583: C++ exception handler found but /EHsc option was not specified
编辑2018年7月25日
现在,我回到了网站上注明的daal版本的确切软件包(非常旧!),并根据拉尔夫的建议更改了CSV路径,我收到了以下编译错误:
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! file2ddc1463da6.o:file2ddc1463da6.cpp:(.text+0x2e6): undefined reference to `daal::data_management::interface1::SerializationIface::serialize(daal::data_management::interface1::InputDataArchive&)'
file2ddc1463da6.o:file2ddc1463da6.cpp:(.text+0x304): undefined reference to `daal::data_management::interface1::SerializationIface::serialize(daal::data_management::interface1::InputDataArchive&)'
file2ddc1463da6.o:file2ddc1463da6.cpp:(.text$_ZN4daal15data_management10interface118SerializationIfacenwEy[_ZN4daal15data_management10interface118SerializationIfacenwEy]+0x16): undefined reference to `daal::services::daal_malloc(unsigned long long, unsigned long long)'
file2ddc1463da6.o:file2ddc1463da6.cpp:(.text$_ZN4daal15data_management10interface118SerializationIfacenaEy[_ZN4daal15data_management10interface118SerializationIfacenaEy]+0x16): undefined reference to `daal::services::daal_malloc(unsigned long long, unsigned long long)'
fi
其来源是一吨管线,例如:
file2ddc1463da6.o:file2ddc1463da6.cpp:(.text+0x2e6): undefined reference to `daal::data_management::interface1::SerializationIface::serialize(daal::data_management::interface1::InputDataArchive&)'
file2ddc1463da6.o:file2ddc1463da6.cpp:(.text+0x304): undefined reference to `daal::data_management::interface1::SerializationIface::serialize(daal::data_management::interface1::InputDataArchive&)'
file2ddc1463da6.o:file2ddc1463da6.cpp:(.text$_ZN4daal15data_management10interface118SerializationIfacenwEy[_ZN4daal15data_management10interface118SerializationIfacenwEy]+0x16): undefined reference to `daal::services::daal_malloc(unsigned long long, unsigned long long)'
file2ddc1463da6.o:file2ddc1463da6.cpp:(.text$_ZN4daal15data_management10interface118SerializationIfacenaEy[_ZN4daal15data_management10interface118SerializationIfacenaEy]+0x16): undefined reference to `daal::services::daal_malloc(unsigned long long, unsigned long long)'
file2ddc1463da6.o:file2ddc1463da6.cpp:(.text$_ZN4daal15data_management10interface118SerializationIfacedlEPvy[_ZN4daal15data_management10interface118SerializationIfacedlEPvy]+0x15): undefined reference to `daal::services::daal_free(void*)'
<> >代码> RCPP::Author >代码,您需要使用一个R内部数据类型(
readCsv
功能中,以下各项应起作用:
C:/Users/Documents/R/win-library/3.3/Rcpp/include/Rcpp/as.h:151:29: note: template argument deduction/substitution failed:
file40e81ac24329.cpp:36:89: note: cannot convert '"C://Users//Documents//BAJAJ.csv"' (type 'const char [40]') to type 'SEXP'
std::string fname = Rcpp::as<std::string>("C://Users//Documents//BAJAJ.csv");
^
file40e81ac24329.cpp:37:29: error: no matching function for call to 'as(int)'
int k = Rcpp::as<int>(7);
make: *** [file40e81ac24329.o] Error 1
Warning message:
running command 'make -f "C:/R/R-33~1.1/etc/x64/Makeconf" -f "C:/R/R-33~1.1/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="file40e81ac24329.dll" WIN=64 TCLBIN=64 OBJECTS="file40e81ac24329.o"' had status 2
ERROR(s) during compilation: source code errors or compiler configuration errors!
std::string fname = "C:/Users/Documents/BAJAJ.csv";
int k = 7;
或者,您可以坚持使用教程中的版本,其中这些参数是从R传入的
顺便说一句,你不需要加倍
/
。只有\
具有特殊含义,必须加倍才能引用字面版本 你使用哪种编译器?你确定这是完整的错误消息吗?嗨,拉尔夫-我使用的是RTools 3.3附带的错误消息,我相信是mingw。我将用更多的错误更新上面的内容。我应该使用不同的编译器吗?虽然我不知道如何更改编译器/以及如何根据网站链接在R代码中调用它,但编译器很旧,但应该可以。您正在使用的教程可能需要更新,但这不是问题所在。关于错误消息:在路径中使用/
而不是`并删除任何前导的-`。如果这还不够,请将调用函数时使用的代码与新的错误消息一起提供。嗨,拉尔夫-非常感谢您迄今为止的帮助。我已经更新了我的代码摘录和上面的错误,你介意快速浏览一下吗?很高兴为您的时间付费,并尽可能安排屏幕共享?非常感谢Ralf-我正在寻找解决方案-现在遇到了一个不同的错误(在上面的帖子中更新)@KKel棘手。你能用英特尔编译器编译一个普通的Rcpp函数而不引用DAAL吗?谢谢Ralf,我能做一个普通的函数,感觉自己接近解决方案了,但又出现了一些编译错误(在上面的7月25日部分更新)…如有进一步要求,我们将不胜感激ideas@KKel这可能意味着链接参数不正确。这些在inline
插件中指定,语法适用于gcc
。英特尔编译器可能需要不同的语法来链接到daal
库。
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! file2ddc1463da6.o:file2ddc1463da6.cpp:(.text+0x2e6): undefined reference to `daal::data_management::interface1::SerializationIface::serialize(daal::data_management::interface1::InputDataArchive&)'
file2ddc1463da6.o:file2ddc1463da6.cpp:(.text+0x304): undefined reference to `daal::data_management::interface1::SerializationIface::serialize(daal::data_management::interface1::InputDataArchive&)'
file2ddc1463da6.o:file2ddc1463da6.cpp:(.text$_ZN4daal15data_management10interface118SerializationIfacenwEy[_ZN4daal15data_management10interface118SerializationIfacenwEy]+0x16): undefined reference to `daal::services::daal_malloc(unsigned long long, unsigned long long)'
file2ddc1463da6.o:file2ddc1463da6.cpp:(.text$_ZN4daal15data_management10interface118SerializationIfacenaEy[_ZN4daal15data_management10interface118SerializationIfacenaEy]+0x16): undefined reference to `daal::services::daal_malloc(unsigned long long, unsigned long long)'
fi
file2ddc1463da6.o:file2ddc1463da6.cpp:(.text+0x2e6): undefined reference to `daal::data_management::interface1::SerializationIface::serialize(daal::data_management::interface1::InputDataArchive&)'
file2ddc1463da6.o:file2ddc1463da6.cpp:(.text+0x304): undefined reference to `daal::data_management::interface1::SerializationIface::serialize(daal::data_management::interface1::InputDataArchive&)'
file2ddc1463da6.o:file2ddc1463da6.cpp:(.text$_ZN4daal15data_management10interface118SerializationIfacenwEy[_ZN4daal15data_management10interface118SerializationIfacenwEy]+0x16): undefined reference to `daal::services::daal_malloc(unsigned long long, unsigned long long)'
file2ddc1463da6.o:file2ddc1463da6.cpp:(.text$_ZN4daal15data_management10interface118SerializationIfacenaEy[_ZN4daal15data_management10interface118SerializationIfacenaEy]+0x16): undefined reference to `daal::services::daal_malloc(unsigned long long, unsigned long long)'
file2ddc1463da6.o:file2ddc1463da6.cpp:(.text$_ZN4daal15data_management10interface118SerializationIfacedlEPvy[_ZN4daal15data_management10interface118SerializationIfacedlEPvy]+0x15): undefined reference to `daal::services::daal_free(void*)'
std::string fname = "C:/Users/Documents/BAJAJ.csv";
int k = 7;