c++ - Compiling the Rcpp package -
c++ - Compiling the Rcpp package -
background
my company thinking bringing r our work environment in conjunction rstudio. part of security checks, have compile each of different c/c++ files in bundle scan possible security flaws. know binaries available, , wish utilize them, have compile ourselves. have no r experience , little experience c++ 5 years ago. i'm trying compile just rcpp c++ code , don't know if possible.
what i've tried
i first tried compile using visualstudio , found it's not c99 compliant. tried cygwin , didn't back upwards w_strings
. have installed ubuntu , getting lot of "undefined reference" errors when compile. know (or @ to the lowest degree believe) rcpp designed help utilize c++ in r. given this, can compile of these files stand lone binary?
some of null references getting while compiling api.cpp
(i don't believe finish list provide more info partial it's quite long):
undefined reference 'r_nilvalue' undefined reference 'reprintf' undefined reference 'r_flushconsole' undefined reference 'rf_install' undefined reference 'rf_setattrib' undefined reference 'rf_mkchar' undefined reference 'set_string_elt' undefined reference 'rf_allocvactor' undefined reference 'r_externalptraddr' etc...
right assume isn't working because i'm not using rcpp in way in intended , passing in values. if tried using r bundle uses rcpp compile rcpp c++ files , leave binaries? there can short of taking binaries off of cran?
solution
this relatively easy solution unable find anywhere else, although people able download binary files won't matter.
1) download cran (not apt-get did not work me)
2) sudo tar -xvf rcpp_x.xx.x.tar.gz
3) r cmd install rcpp
this create binary .so you.
quick ones:
it spelled rcpp, capital r followed lowercase cpp. file extension.
you made heroic assumption rcpp can compiled visual studio [1]. can't [2]. , have documented literally years, i.e. @ minumum since late 2008 when relaunched rcpp.
see e.g. entries 1.3 , 2.9 rcpp faq comes every download of rcpp.
ditto cygwin. r not build under cygwin. hence don't seek building rcpp under cygwin.
last not least: not sure how closely have looked @ rcpp documentation, , think for. not magic pony converts r scripts windows binaries you. no such pony exists. rcpp extension bundle r makes r , c++ interchange easier. no more, no less. there few hundred rcpp questions here around feel.
all certainly repeat question closed don't have time now.
[1] note singular here, not plural "visual studios", or maybe referring other compiler , ide company pacific northwest.
[2] unless genuine c++-on-windows expert , willing more-or-less build own build scheme [3]
[3] due r not beingness able build vs toolchain. , $deity knows people have tried. blame here lies on side of os / compiler vendor not next standards enable r core team provide consistent product on windows (via gcc), os x , flavour of unix, including linux variants.
c++ r rcpp
Comments
Post a Comment