且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

结合R,C ++和Fortran

更新时间:2023-02-07 20:59:23

当您在两个源文件中包含代码

When you have code in two sources files

  • mvtnorm.cpp调用您的后端函数pmvnorm_P()
  • 提供该文件的另一个文件
  • mvtnorm.cpp calling your backend function pmvnorm_P()
  • another file providing it

然后您还必须提供链接说明.简而言之,sourceCpp()仅用于一种文件解决方案(除非您提供链接说明).

then you also must provide link instructions. Simply put, sourceCpp() is only intentended and working for one-file solutions (unless you give link instructions).

最简单的解决方法:只需创建一个程序包,即可将 all 的文件组装到src/中.

Simplest fix: just create a package assembling all your files in src/.