簡體   English   中英

安裝R軟件包時的未定義參考

[英]Undefined reference in installing a R package

我有一個私人R包,當我嘗試安裝時出現錯誤,其中functInterp是我的包的名稱

c:/Rtools/mingw_32/bin/g++ -shared -s -static-libgcc -o functInterp.dll tmp.def RcppExports.o empTraceVariogram.o empTraceVariogramTemp.o -Ld:/Compiler/gcc-4.9.3/local330/lib/i386 -Ld:/Compiler/gcc-4.9.3/local330/lib -LC:/PROGRA~1/R/R-34~1.2/bin/i386 -lR empTraceVariogramTemp.o:empTraceVariogramTemp.cpp:(.text+0x180):undefined reference to  dnrm2_'
  empTraceVariogram.o:empTraceVariogram.cpp:(.text+0x5bb): undefined
  reference todnrm2_' empTraceVariogram.o:empTraceVariogram.cpp:(.text+0x5f8): undefined reference to `ddot_'

答案后,我得到了:

C:/Users/utente/Documents/R/win-library/3.4/RcppArmadillo/include/armadillo_bits/compiler_setup.hpp:474:96: note: #pragma message: WARNING: use of OpenMP disabled; this compiler doesn't support OpenMP 3.0+
   #pragma message ("WARNING: use of OpenMP disabled; this compiler doesn't support OpenMP 3.0+")
                                                                                                ^
RcppExports.cpp:115:55: error: address of overloaded function with no contextual type information
     {"functInterp_empTraceCrossVariogram", (DL_FUNC) &functInterp_empTraceCrossVariogram, 8},

這是RcppArmadillo還是函數錯誤?

您的鏈接說明有誤。 從使用RcppArmadillo的軟件包中查看任何src/Makevars.win ,並使用此代碼:

## optional
#CXX_STD = CXX11

PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS) 
PKG_LIBS = $(SHLIB_OPENMP_CFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)

$(SHLIB_OPENMP_CXXFLAGS)對您來說是可選的,但現在Armadillo希望使用它。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM