<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#3333FF">
Dear List,<br>
<br>
I am working through the vingette "Exposing C++ functions and
classes with Rcpp modules," and am stuck at section 2.2.1.<br>
<br>
I create a text file with the code for the Uniform class, and
successfully compile it with R CMD SHLIB.<br>
<br>
Can you please tell me how to load it into R so that I can continue
with the example? The vingette clearly shows how to use it once
everything is set up, but does not show how to set things up.<br>
<br>
This is, in fact, my main frustration with all of the rcpp
documentation. It consistently assumes a high level of
sophistication from its users. Almost none of the examples work "as
is", nor do they give hints as to what information is missing. For
example, the c++ code as given in the example does not compile. The
reader has to know to add an include directive. This is mentioned
nowhere in the vingette. Or my case, where I need to know how to
load the module. Again, this is never described. <br>
<br>
Likewise, with the first example (section 2.1), the given R commands
fail:<br>
> require( Rcpp )<br>
Loading required package: Rcpp<br>
> mod <- Module( "mod" )<br>
> mod$norm( 3, 4 )<br>
Error in Module(module, mustStart = TRUE) : <br>
Failed to initialize module pointer: Error in
FUN("_rcpp_module_boot_mod"[[1L]], ...): no such symbol
_rcpp_module_boot_mod in package .GlobalEnv<br>
<br>
Nor do I see where (or how?) the dynamic library containing the
compiled norm function is loaded.<br>
<br>
+glenn<br>
<br>
<br>
<pre class="moz-signature" cols="66">--
-----------------------------------
It is difficult to find a black cat in a dark room,
especially if there is no cat.
-- Chinese proverb
Dr. Glenn Lawyer
+352 661 967 244
Max-Planck-Institut für Informatik
Computational Biology and Applied Algorithmics
Campus E1 4
66123 Saarbrücken, Germany
<a class="moz-txt-link-freetext" href="http://bioinf.mpi-inf.mpg.de/~lawyer">http://bioinf.mpi-inf.mpg.de/~lawyer</a>
</pre>
</body>
</html>