[Rcpp-devel] Regular Expressions
Dirk Eddelbuettel
edd at debian.org
Sun Mar 3 03:13:46 CET 2013
On 2 March 2013 at 20:59, Gabor Grothendieck wrote:
| > | If I use the MinGW from nuewn and run this from the Windows cnd line I
| > | get no errors or warnings (note that ^ must be the last character on
| > | the line to escape the newline):
| > |
| > | C:\MinGW\set_distro_paths.bat
| > | g++ -DNDEBUG ^
| > | -L %userprofile%/Documents/R/win-library/2.15/Rcpp/lib/x64/libRcpp.a ^
| > | -lboost_regex ^
| > | -I"C:/PROGRA~1/R/R-2.15/include" ^
| > | -I%userprofile%/Documents/R/win-library/2.15/Rcpp/include ^
| > | -O2 -Wall -mtune=core2 -c credit.cpp -o credit.o
| > |
| > | If tyhat is ok then what would the next step be?
| >
| > That looks pretty good. Use similar settings, make sure R sees them, and let
| > R CMD ... do its magic. Everything, be it via Makevars and Makevars.win, via
| > inline's cxxfunction or Rcpp's sourceCpp just calls them anyway.
| >
|
| If I try this next after the above g++ line:
|
| R CMD SHLIB credit.o
|
| then I get this:
|
| C:/PROGRA~1/R/R-2.15/bin/x64/R.dll: file not recognized: File format
| not recognized
| collect2: ld returned 1 exit status
You are mixing g++ and R CMD SHLIB, which is not recommended. Use only R CMD
SHLIB, if possible. See Rcpp-FAQ Question 2.5 for one possibilty. Just
expand compiler and linker flags to contain all you need. In essence, the
(large but modular) Makevars in eg RInside do just that.
Dirk
--
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
More information about the Rcpp-devel
mailing list