更新时间: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()
然后您还必须提供链接说明.简而言之,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/
.