Hi all, I've created a package using Rcpp.package.skeleton("pkg",module=TRUE).
If I create a file R/hello_world2.R with the following show(World) b <- new(World) b$greet() b$set("hello everybody") b$greet() rm(b) then I receive an "execution halted" error when I try to compile the package using R CMD INSTALL pkg. Why is this? I've included my steps below. > library(Rcpp) # latest version from CRAN > Rcpp.package.skeleton("pkg",module=TRUE) Creating directories ... Creating DESCRIPTION ... Creating NAMESPACE ... Creating Read-and-delete-me ... Saving functions and data ... Making help files ... Done. Further steps are described in './pkg/Read-and-delete-me'. Adding Rcpp settings >> added RcppModules: yada >> added Depends: Rcpp >> added LinkingTo: Rcpp >> added useDynLib directive to NAMESPACE >> added Makevars file with Rcpp settings >> added Makevars.win file with Rcpp settings >> added example header file using Rcpp classes >> added example src file using Rcpp classes >> added example R file calling the C++ example >> added Rd file for rcpp_hello_world >> copied the example module > q() Save workspace image? [y/n/c]: n chris@seldon:~/Documents/networkstats$ R CMD INSTALL pkg * installing to library ‘/home/chris/R/i486-pc-linux-gnu-library/2.10’ * installing *source* package ‘pkg’ ... ** libs g++ -I/usr/share/R/include -I"/home/chris/R/i486-pc-linux-gnu-library/2.10/Rcpp/include" -fpic -O3 -pipe -g -c rcpp_hello_world.cpp -o rcpp_hello_world.o g++ -I/usr/share/R/include -I"/home/chris/R/i486-pc-linux-gnu-library/2.10/Rcpp/include" -fpic -O3 -pipe -g -c rcpp_module.cpp -o rcpp_module.o g++ -shared -o pkg.so rcpp_hello_world.o rcpp_module.o -L/home/chris/R/i486-pc-linux-gnu-library/2.10/Rcpp/lib -lRcpp -Wl,-rpath,/home/chris/R/i486-pc-linux-gnu-library/2.10/Rcpp/lib -L/usr/lib/R/lib -lR installing to /home/chris/R/i486-pc-linux-gnu-library/2.10/pkg/libs ** R ** preparing package for lazy loading ** help Warning: /home/chris/Documents/networkstats/pkg/man/pkg-package.Rd:32: All text must be in a section Warning: /home/chris/Documents/networkstats/pkg/man/pkg-package.Rd:33: All text must be in a section *** installing help indices ** building package indices ... ** testing if installed package can be loaded * DONE (pkg) chris@seldon:~/Documents/networkstats$ R R version 2.13.1 (2011-07-08) > library(pkg) Loading required package: Rcpp > source("pkg/R/rcpp_hello_world.R") > rcpp_hello_world() # works as expected [[1]] [1] "foo" "bar" [[2]] [1] 0 1 > q() chris@seldon:~/Documents/networkstats$ cp rcpp_hello_world2.R pkg/R/ chris@seldon:~/Documents/networkstats$ R CMD INSTALL pkg * installing to library ‘/home/chris/R/i486-pc-linux-gnu-library/2.10’ * installing *source* package ‘pkg’ ... ** libs make: Nothing to be done for `all'. installing to /home/chris/R/i486-pc-linux-gnu-library/2.10/pkg/libs ** R ** preparing package for lazy loading Execution halted
_______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel