Message-ID: <CABdHhvF4oLtGAfuv41uNAQ98xPO6o8A-s5zt8=R7LDuHZBz9ow@mail.gmail.com>
Date: 2013-10-28T16:05:24Z
From: Hadley Wickham
Subject: [Rcpp-devel] inline error
In-Reply-To: <9118E1B3-E9CE-45D5-82ED-CD3C3ACE07EF@uni-bonn.de>
FYI, that's equivalent to the somewhat cleaner
library(Rcpp)
cppFunction("NumericVector x(NumericVector start) {
return 1;
}")
Hadley
On Mon, Oct 28, 2013 at 8:58 AM, Simon Zehnder <szehnder at uni-bonn.de> wrote:
> Dear Rcpp::Users and Rcpp::Devels,
>
> I get a weird error when using inline and I want to know, where it comes from. I run the following code:
>
> library(Rcpp)
> library(inline)
> cfunc <- cxxfunction(signature(start="vector"), body = "Rcpp::NumericVector x(start); return 1;", plugins = "Rcpp?)
>
> And I get the following Error:
>
> Error in compileCode(f, code, language = language, verbose = verbose) :
> Compilation ERROR, function(s)/method(s) not created! file1606062c0507.cpp: In function ?SEXPREC* file1606062c0507(SEXP)?:
> file1606062c0507.cpp:19:1: error: ?Rcpp? has not been declared
> Rcpp::NumericVector x(start); return 1;
> ^
> file1606062c0507.cpp:19:21: error: expected ?;? before ?x?
> Rcpp::NumericVector x(start); return 1;
> ^
> file1606062c0507.cpp:19:38: error: invalid conversion from ?int? to ?SEXP? [-fpermissive]
> Rcpp::NumericVector x(start); return 1;
> ^
> make: *** [file1606062c0507.o] Error 1
> In addition: Warning message:
> running command '/Library/Frameworks/R.framework/Resources/bin/R CMD SHLIB file1606062c0507.cpp 2> file1606062c0507.cpp.err.txt' had status 1
>
> Best
> Simon
>
> _______________________________________________
> Rcpp-devel mailing list
> Rcpp-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
--
Chief Scientist, RStudio
http://had.co.nz/