[Rcpp-commits] r403 - pkg/inst/discovery
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Jan 19 08:08:00 CET 2010
Author: romain
Date: 2010-01-19 08:07:59 +0100 (Tue, 19 Jan 2010)
New Revision: 403
Modified:
pkg/inst/discovery/cxx0x.R
Log:
make sure we use the c++ compiler
Modified: pkg/inst/discovery/cxx0x.R
===================================================================
--- pkg/inst/discovery/cxx0x.R 2010-01-18 19:08:15 UTC (rev 402)
+++ pkg/inst/discovery/cxx0x.R 2010-01-19 07:07:59 UTC (rev 403)
@@ -25,7 +25,7 @@
#include <R.h>
#include <Rdefines.h>
- SEXP cxx0x(){
+ extern "C" SEXP cxx0x(){
#ifdef __GNUC__
#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
@@ -47,8 +47,8 @@
setwd(here) ;
unlink( td, recursive = TRUE )
} )
- writeLines( cxx0x.code, "cxx0x.c" )
- cmd <- sprintf( "%s/R CMD SHLIB cxx0x.c", R.home(component="bin") )
+ writeLines( cxx0x.code, "cxx0x.cpp" )
+ cmd <- sprintf( "%s/R CMD SHLIB cxx0x.cpp", R.home(component="bin") )
system( cmd, intern = TRUE )
dyn.load( dll )
res <- tryCatch( .Call( "cxx0x" ), error = "" )
More information about the Rcpp-commits
mailing list