<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#3333FF">
    The problem seems to be file privileges. When I run R as superuser,
    it works. When I run as a normal user, I continue getting<br>
    <br>
    Error in dyn.load(libLFile)
    :                                                                                                     

    <br>
      unable to load shared object
    '/tmp/RtmpTFHtzm/file1d365e7eaf51.so':                   <br>
      /tmp/RtmpTFHtzm/file1d365e7eaf51.so: undefined symbol:
    _ZN4Rcpp8internal14r_vector_startILi14EdEEPT0_P7SEXPREC    <br>
    <br>
    Note that the names of the undefined symbol is the same for all of
    the ways and examples I have tested, which include: <br>
    cxxfunction (following the vignette)<br>
    cppFunction (following Hadley's tutorial)<br>
    R CMD INSTALL -l foo mypackage<br>
    where "mypackage" is created by Rcpp.package.skeleton("mypackage")<br>
    R CMD INSTALL -l foo somepackage.tar.gz<br>
    where "somepackage" is a package downloaded from CRAN which uses
    Rcpp.<br>
    <br>
    I would very much appreciate a hint/suggestion as to which
    folders/directories/paths I may need to check to get the file
    permissions correct.<br>
    <br>
    Does the name of the undefined symbol tell you anything? If you
    ignore some characters, it reads<br>
    ...Rccp.internal..r_vector_start...SEXPR..<br>
    <br>
    +glenn<br>
    <br>
    <br>
    <br>
    On 12/12/2012 05:15 PM, Dirk Eddelbuettel wrote:
    <blockquote cite="mid:20680.44445.44669.556757@max.nulle.part"
      type="cite">
      <pre wrap="">Works for me:

R> require(Rcpp)
R> require(inline)
Loading required package: inline
R> inc <- '
+    using namespace Rcpp;
+    double norm( double x, double y ) {
+    return sqrt( x*x + y*y );
+    }
+    RCPP_MODULE(mod) {
+    function( "norm", &norm );
+    }
+ '
R> fx <- cxxfunction(signature(), plugin="Rcpp", include=inc)
R> 
R> mod <- Module( "mod", getDynLib(fx) )
R> 
R> mod$norm( 3, 4 )
[1] 5
R> 
R> sessionInfo()
R version 2.15.2 (2012-10-26)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8   
 [6] LC_MESSAGES=en_US.UTF-8    LC_PAPER=C                 LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] inline_0.3.10   RQuantLib_0.3.9 Rcpp_0.10.1.5  

loaded via a namespace (and not attached):
[1] compiler_2.15.2 tools_2.15.2   
R> 

That is with Rcpp from SVN but that shouldn't matter.

Dirk

</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="66">-- 
--------------------------------------------------------------
Pirating science, because open access isn't always open enough
<a class="moz-txt-link-abbreviated" href="http://www.scipirate.com">www.scipirate.com</a>                                   @piratesci

     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/%7Elawyer">http://bioinf.mpi-inf.mpg.de/~lawyer</a>

</pre>
  </body>
</html>