Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/83.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
正在尝试编译R包RSAP_R_Package_Sap - Fatal编程技术网

正在尝试编译R包RSAP

正在尝试编译R包RSAP,r,package,sap,R,Package,Sap,我正在尝试使用命令编译R包 R CMD INSTALL RSAP 必要的SAP库SAP NW RFCSDK位于C:\nwrfcsdk中 我正在Windows1064上构建 R版本3.4 32位(我也是64位) 使用mingw32的R工具 它不编译,但终止时出现以下错误: c:/Rtools/mingw_32/bin/gcc -shared -s -static-libgcc -o RSAP.dll tmp.def RSAP.o -L. -LC:/nwrfcsdk/lib -lsapnwrf

我正在尝试使用命令编译R包

R CMD INSTALL RSAP
必要的SAP库
SAP NW RFCSDK
位于
C:\nwrfcsdk

  • 我正在Windows1064上构建
  • R版本3.4 32位(我也是64位)
  • 使用mingw32的R工具
它不编译,但终止时出现以下错误:

c:/Rtools/mingw_32/bin/gcc -shared -s -static-libgcc -o RSAP.dll tmp.def RSAP.o -L. -LC:/nwrfcsdk/lib -lsapnwrfc -llibsapucum -Ld:/Compiler/gcc-4.9.3/local330/lib/i386 -Ld:/Compiler/gcc-4.9.3/local330/lib -LC:/PROGRA~1/R/R-34~1.0/bin/i386 -lR
RSAP.o:RSAP.c:(.text+0x4b): undefined reference to `RfcPing@8'
RSAP.o:RSAP.c:(.text+0x23a): undefined reference to `RfcUTF8ToSAPUC@24'
RSAP.o:RSAP.c:(.text+0x2d5): undefined reference to `RfcUTF8ToSAPUC@24'
RSAP.o:RSAP.c:(.text+0x369): undefined reference to `RfcUTF8ToSAPUC@24'
RSAP.o:RSAP.c:(.text+0x3ef): undefined reference to `RfcSAPUCToUTF8@24'
RSAP.o:RSAP.c:(.text+0x4b8): undefined reference to `RfcSAPUCToUTF8@24'
RSAP.o:RSAP.c:(.text+0x645): undefined reference to `RfcUTF8ToSAPUC@24'
RSAP.o:RSAP.c:(.text+0x6e3): undefined reference to `RfcUTF8ToSAPUC@24'
RSAP.o:RSAP.c:(.text+0x719): undefined reference to `RfcOpenConnection@12'
RSAP.o:RSAP.c:(.text+0x923): undefined reference to `RfcCloseConnection@8'
...
以此类推,直到它以

collect2.exe: error: ld returned 1 exit status
keine DLL erzeugt
ERROR: compilation failed for package 'RSAP'
* removing 'C:/Users/jmueller/R/win-library/3.4/RSAP'
* restoring previous 'C:/Users/jmueller/R/win-library/3.4/RSAP'

我做错了什么?非常感谢您的帮助

当您尝试在32位R环境中使用64位版本的
SAP NW RFC SDK
构建RSAP时,就会发生这种情况。我也遇到了同样的问题,在RGui的64位环境中执行了以下命令(64位版本的
SAP NW RFC SDK
位于
C:\nwrfcdk
)之后,未定义的引用消失了

命令:

install.packages('RSAP', repos=c('http://piersharding.com/R'), type="source", configure.args=c('--with-nwrfcsdk-include=C:/nwrfcsdk/include --with-nwrfcsdk-lib=C:/nwrfcsdk/lib'))
如中所述:

安装包('RSAP',repos=c('RSAP')怎么样http://piersharding.com/R'),type=“source”,configure.args=c('--with nwrfcsdk include=c:/nwrfcsdk/include--with nwrfcsdk lib=c:/nwrfcsdk/lib'))按照windows的安装说明?@RomanLuštrik我尝试了这一方法,但也失败了,并显示了相同的错误消息。我认为最好使用标准工具隔离错误。包含路径与包的构建脚本中指定的路径完全相同。您是否告诉编译器SAP位于何处?