Skip to content
Prev 7247 / 10988 Next

[Rcpp-devel] Avoiding having to write .h files

Only because it is extra work... Anyway, I hope this Rcpp::interfaces(r,cpp)-feature gets up and running again :)

S?ren

-----Original Message-----
From: Romain Fran?ois [mailto:romain at r-enthusiasts.com] 
Sent: 25. februar 2014 12:39
To: S?ren H?jsgaard
Cc: rcpp-devel at lists.r-forge.r-project.org (rcpp-devel at r-forge.wu-wien.ac.at)
Subject: Re: [Rcpp-devel] Avoiding having to write .h files

Hello, 

Why do you want to avoid writing headers. I guess you could use extern 

For example, in foo1.cpp : 

double fun1(){
  return 2.0 ;
}

In foo2.cpp ;

extern double fun1() ;

double fun2(){
  return fun1() + 2; 
}

Romain

Le 25 f?vr. 2014 ? 12:28, S?ren H?jsgaard <sorenh at math.aau.dk> a ?crit :