Le 24/01/12 22:27, Whit Armstrong a écrit :
yes, unless I add

#include<armadillo>

Then it blows up.

Don't do that. When using RcppArmadillo, you do:

#include <RcppArmadillo.h>

Some magic happens when you do that. Not sure it solves your issue though.

Romain

The problem is in my real function I include a header, which includes armadillo.

So, unless I go deleting all the refs to #include<armadillo>, I think
it will continue to blow up...  (with the current released version).

Anyway, I'll just wait for the next release.

Thanks,
Whit


On Tue, Jan 24, 2012 at 4:23 PM, Dirk Eddelbuettel<[email protected]>  wrote:

Slow down. You are rushing things a little:

a) we _do_ want the Arma plugin, it does more than just one setting

b) once we have it, Arma works fine:

require(inline)
cppbugs.plugin<- getPlugin("RcppArmadillo")      ## Arma!!
cppbugs.plugin$env$PKG_CXXFLAGS<- "-std=c++0x"
foo.bar<- cxxfunction(signature(hat="numeric"), body='
   arma::colvec v(2);
   return Rcpp::wrap(v);
', settings=cppbugs.plugin, verbose=TRUE)


Dirk

--
"Outside of a dog, a book is a man's best friend. Inside of a dog, it is too
dark to read." -- Groucho Marx
_______________________________________________
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel


--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
R Graph Gallery: http://addictedtor.free.fr/graphiques
blog:            http://romainfrancois.blog.free.fr
|- http://bit.ly/xbKv0R : Crawling facebook with R
|- http://bit.ly/v3WB8S : ... And now for solution 17, still using Rcpp
`- http://bit.ly/uaQDGr : int64: 64 bit integer vectors for R
_______________________________________________
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to