Skip to content
Prev 5890 / 10988 Next

[Rcpp-devel] How to put the code 2013-01-05-r-function-from-c++.cpp in the src/ directory of a package?

Hi Dirk,

When I try to replicate the method used sourceCpp, I get the following
error. I'm not sure what is wrong. Would you please take a look how to
fix the error? Thanks.

~/dvcs_src/rexample/Rexample/cran/Rcpp/sourceCppFunction$ Rshl.sh main.cpp
llvm-g++-4.2 -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names
-undefined dynamic_lookup -single_module -multiply_defined suppress
-L/usr/local/lib -L/usr/local/lib -o main.so main.o
/Users/py/utility/R_user/Rcpp/lib/libRcpp.a
-F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework
-Wl,CoreFoundation
~/dvcs_src/rexample/Rexample/cran/Rcpp/sourceCppFunction$ Rscript main.R
function (x, f)
.Primitive(".Call")(<pointer: 0x103c73660>, x, f)
terminate called after throwing an instance of 'Rcpp::not_compatible'
  what():  cannot convert to function
Abort trap: 6

Thread (15 messages)

Peng Yu How to put the code 2013-01-05-r-function-from-c++.cpp in the src/ directory of a package? May 24 Dirk Eddelbuettel How to put the code 2013-01-05-r-function-from-c++.cpp in the src/ directory of a package? May 24 Peng Yu How to put the code 2013-01-05-r-function-from-c++.cpp in the src/ directory of a package? May 24 Dirk Eddelbuettel How to put the code 2013-01-05-r-function-from-c++.cpp in the src/ directory of a package? May 24 Peng Yu How to put the code 2013-01-05-r-function-from-c++.cpp in the src/ directory of a package? May 25 Dirk Eddelbuettel How to put the code 2013-01-05-r-function-from-c++.cpp in the src/ directory of a package? May 25 Peng Yu How to put the code 2013-01-05-r-function-from-c++.cpp in the src/ directory of a package? May 25 Dirk Eddelbuettel How to put the code 2013-01-05-r-function-from-c++.cpp in the src/ directory of a package? May 25 Dirk Eddelbuettel How to put the code 2013-01-05-r-function-from-c++.cpp in the src/ directory of a package? May 25 Peng Yu How to put the code 2013-01-05-r-function-from-c++.cpp in the src/ directory of a package? May 25 Dirk Eddelbuettel How to put the code 2013-01-05-r-function-from-c++.cpp in the src/ directory of a package? May 25 Peng Yu How to put the code 2013-01-05-r-function-from-c++.cpp in the src/ directory of a package? May 26 Dirk Eddelbuettel How to put the code 2013-01-05-r-function-from-c++.cpp in the src/ directory of a package? May 26 Peng Yu How to put the code 2013-01-05-r-function-from-c++.cpp in the src/ directory of a package? May 26 Dirk Eddelbuettel How to put the code 2013-01-05-r-function-from-c++.cpp in the src/ directory of a package? May 26