Hi guys.<div><br></div><div>First off, thanks for a nice piece of software.</div><div><br></div><div>Now to the issue at hand:</div><div><br></div><div>I&#39;m trying to compile and link the package obtained using Rcpp.package.skeleton(...) (out of the box). I&#39;m running R 2.13.1, with Rcpp 0.9.6 on a Windows XP machine. </div>
<div><br></div><div>The first problem I ran into was how the package-libs variable PKG_LIBS was pasted into the g++ string for compiling:</div><div><br></div><div><div>g++ -shared -s -static-libgcc -o processes.dll tmp.def rcpp_hello_world.o rcpp_module.o C:/Program Files/R/R-2.13.1/library/Rcpp/lib/i386/libRcpp.a -LC:/PROGRA~1/R/R-213~1.1/bin/i386 -lR</div>
<div>g++.exe: C:/Program: No such file or directory</div><div>g++.exe: Files/R/R-2.13.1/library/Rcpp/lib/i386/libRcpp.a: No such file or directory</div><div>ERROR: compilation failed for package &#39;processes&#39;</div><div>
* removing &#39;D:/Documents/Eclipse/processes.Rcheck/processes&#39;</div></div><div><br></div><div>As you can see, paths with spaces in them is not cool.I resolved this by overriding it in makevars.win by hard-coding it, so my makevars.win looks like</div>
<div><br></div><div>## Use the R_HOME indirection to support installations of multiple R version</div><div><div>## PKG_LIBS = $(shell &quot;${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe&quot; -e &quot;Rcpp:::LdFlags()&quot;)</div>
<div>PKG_LIBS = $(&quot;C:/PROGRA~1/R/R-2.13.1/library/Rcpp/lib/i386/libRcpp.a&quot;)</div></div><div><br></div><div>Compiling then works fine, and spits out the files rcpp_module.o and rcpp_hello_world.o. The problem then is linking, which complains over &quot;undefined reference&quot;:</div>
<div><br></div><div><div>* installing *source* package &#39;processes&#39; ...</div><div>** libs</div><div>cygwin warning:</div><div>  MS-DOS style path detected: C:/PROGRA~1/R/R-213~1.1/etc/i386/Makeconf</div><div>  Preferred POSIX equivalent is: /cygdrive/c/PROGRA~1/R/R-213~1.1/etc/i386/Makeconf</div>
<div>  CYGWIN environment variable option &quot;nodosfilewarning&quot; turns off this warning.</div><div>  Consult the user&#39;s guide for more details about POSIX paths:</div><div>    <a href="http://cygwin.com/cygwin-ug-net/using.html#using-pathnames">http://cygwin.com/cygwin-ug-net/using.html#using-pathnames</a></div>
<div>g++ -shared -s -static-libgcc -o processes.dll tmp.def rcpp_hello_world.o rcpp_module.o -LC:/PROGRA~1/R/R-213~1.1/bin/i386 -lR</div><div>rcpp_hello_world.o:rcpp_hello_world.cpp:(.text+0x66): undefined reference to `Rcpp::RObject::setSEXP(SEXPREC*)&#39;</div>
<div>rcpp_hello_world.o:rcpp_hello_world.cpp:(.text+0x71): undefined reference to `void Rcpp::internal::r_init_vector&lt;16&gt;(SEXPREC*)&#39;</div><div>rcpp_hello_world.o:rcpp_hello_world.cpp:(.text+0x148): undefined reference to `Rcpp::RObject::setSEXP(SEXPREC*)&#39;</div>
<div>rcpp_hello_world.o:rcpp_hello_world.cpp:(.text+0x1a7): undefined reference to `Rcpp::RObject::setSEXP(SEXPREC*)&#39;</div></div><div><br></div><div>I&#39;m assuming that these two errors are somewhat related, but can&#39;t figure it out (the compile processs running R CMD check is a bit intransparent to me). I should mention that this exact procedure worked fine until I upgraded from 2.13.0 to 2.13.1 yesterday.</div>
<div><br></div><div>Any clues on what to look at??</div><div><br></div><div>Thanks!</div><div><br></div><div>BR,</div><div>Bjørn</div><div><br><div><div><br></div>-- <br>Up, down, turn around<br>Please dont let me hit the ground<br>
Tonight I think Ill walk alone<br>Ill find my soul as I go home.<br>
</div></div>