Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

cppFunction won't compile #1017

Closed
Closed
@tjmckinley

Description

@tjmckinley

Hi,
There is an issue withcppFunction in that it won't compile if you require multiple libraries. A minimal reproducible example is below. (I appreciate that this example doesn't actually require theBH andRcppArmadillo header files, but the presence of the former means that the header file for latter isn't linked.)

library(Rcpp)cppFunction('arma::mat timesTwo(arma::mat x) {    return x * 2.0;}', depends = c("BH", "RcppArmadillo"))

Running the above example causes a compilation error. I have raised a pull request (#1016 ) that fixes this. The result of me runningsessionInfo() is:

R version 3.5.2 (2018-12-20)Platform: x86_64-pc-linux-gnu (64-bit)Running under: Ubuntu 19.04Matrix products: defaultBLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.8.0LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.8.0locale: [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C               LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8     LC_MONETARY=en_GB.UTF-8    [6] LC_MESSAGES=en_GB.UTF-8    LC_PAPER=en_GB.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            [11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       attached base packages:[1] stats     graphics  grDevices utils     datasets  methods   base     other attached packages:[1] Rcpp_1.0.3loaded via a namespace (and not attached):[1] compiler_3.5.2            tools_3.5.2               RcppArmadillo_0.9.800.1.0 BH_1.69.0-1

Many thanks,

TJ

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp