Skip to content
Prev 7299 / 10988 Next

[Rcpp-devel] Shared library error after update

Hi Kevin,

the github repo is a good idea, though I have some dependencies on other C++ libraries that have to be installed first and that makes it unfavourable. 

However, I figured out where the source of the error seems to be: It is a header file of a C++ class that can be constructed from an Rcpp::S4 object. It looks like this:

#ifndef FINMIXDATA_H
#define FINMIXDATA_H

#include <RcppArmadillo.h>
#include <string>

class FinmixData {
	public:
		arma::mat y;
		arma::ivec S;
		arma::vec expos;
		arma::vec T;
	
		std::string dataType;
		unsigned int N;
		unsigned int r;
	
		/* constructor */ 
		FinmixData (const Rcpp::S4& classS4) :
                  y(Rcpp::as<arma::mat>((SEXP) classS4.slot("y"))),
                 S(Rcpp::as<arma::ivec>((SEXP) classS4.slot("S"))),
                 expos(Rcpp::as<arma::vec>((SEXP) classS4.slot("exp"))),
                 T(Rcpp::as<arma::vec>((SEXP) classS4.slot("T"))),
                 dataType(Rcpp::as<std::string>((SEXP) classS4.slot("type"))),
                 N(Rcpp::as<unsigned int>((SEXP) classS4.slot("N"))),
                 r(Rcpp::as<unsigned int>((SEXP) classS4.slot("r"))) {}		
               ~FinmixData () {}
};
#endif 

This worked before the update. It seems to me that I have to change the initialisation list ?. I work on it. Any suggestions are welcome!

Best

Simon
On 03 Mar 2014, at 17:53, Kevin Ushey <kevinushey at gmail.com> wrote: