我试图安装RcppGSL作为在逃避这个库中的链接上面介绍到C后RcppGSL Windows安装麻烦
Linking GSL library to RcppGSL on Windows machine
介绍:在64升/ local323 和移动的所有文件一个目录放入链接中显示的LIB_GSL/lib中。我使用了下面的代码。
library(Rcpp)
Sys.setenv("LIB_GSL" = "C:/local323") # this is where the library is located
Sys.setenv("PKG_LIBS"="-L(LIB_GSL)/lib -lgsl -lgslcblas")
install.packages("RcppGSL")
我增加了行
Sys.setenv("PKG_LIBS"="-L(LIB_GSL)/lib -lgsl -lgslcblas")
收到以下错误后(我仍然得到了同样的错误)做了一些研究之后,认为有可能是一个连接问题(只是猜测)。
我收到的错误是
RcppExports.o:RcppExports.cpp:(.text+0x916): undefined reference to `gsl_matrix_alloc'
RcppExports.o:RcppExports.cpp:(.text+0x945): undefined reference to `gsl_matrix_set'
RcppExports.o:RcppExports.cpp:(.text+0x993): undefined reference to `gsl_vector_calloc'
fastLm.o:fastLm.cpp:(.text+0x122): undefined reference to `gsl_vector_calloc'
fastLm.o:fastLm.cpp:(.text+0x131): undefined reference to `gsl_matrix_alloc'
fastLm.o:fastLm.cpp:(.text+0x142): undefined reference to `gsl_multifit_linear_alloc'
fastLm.o:fastLm.cpp:(.text+0x16d): undefined reference to `gsl_multifit_linear'
fastLm.o:fastLm.cpp:(.text+0x175): undefined reference to `gsl_multifit_linear_free'
fastLm.o:fastLm.cpp:(.text+0x24f): undefined reference to `gsl_matrix_diagonal'
setErrorHandler.o:setErrorHandler.cpp:(.text+0x104): undefined reference to `gsl_set_error_handler_off'
setErrorHandler.o:setErrorHandler.cpp:(.text+0x133): undefined reference to `gsl_set_error_handler'
任何帮助是极大的赞赏!
行行出状元,
史蒂夫
可能重复[什么是未定义的引用/未解析的外部符号错误,以及如何解决它?](http://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved- external-symbol-error-and-how-do-i-fix) –