On Wed, Dec 10, 2008 at 09:12:12PM +0100, Maxime Debon wrote: > I am facing a difficulty with loading a library depending on a library > (libMesh) which needs an initialization function (libMesh::init(argc, > argv);).
Create 'fake' argc/argv as eg in char *myargv[] = { "somename", "--foo", "--bar"}; int myargc = (sizeof(myargv) - sizeof(myargv) ) / sizeof(myargv[0]); init(myargc, myargv); obviously, --foo and --bar need to be supported by the library in question. Else just do char *myargv[] = { "somename" }; > Conventionally, the way to make a bridge between R and C is : > ___________________________________ > > extern "C" { > > void foo_R(double* output, double* S, double* K){ > > > *output = foo(*S,*K,*r,*sigma,*time); Black/Scholes, eh? Dirk -- Three out of two people have difficulties with fractions. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.