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'm trying to compile and link the package obtained using Rcpp.package.skeleton(...) (out of the box). I'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 'processes'</div><div>
* removing 'D:/Documents/Eclipse/processes.Rcheck/processes'</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 "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e "Rcpp:::LdFlags()")</div>
<div>PKG_LIBS = $("C:/PROGRA~1/R/R-2.13.1/library/Rcpp/lib/i386/libRcpp.a")</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 "undefined reference":</div>
<div><br></div><div><div>* installing *source* package 'processes' ...</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 "nodosfilewarning" turns off this warning.</div><div> Consult the user'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*)'</div>
<div>rcpp_hello_world.o:rcpp_hello_world.cpp:(.text+0x71): undefined reference to `void Rcpp::internal::r_init_vector<16>(SEXPREC*)'</div><div>rcpp_hello_world.o:rcpp_hello_world.cpp:(.text+0x148): undefined reference to `Rcpp::RObject::setSEXP(SEXPREC*)'</div>
<div>rcpp_hello_world.o:rcpp_hello_world.cpp:(.text+0x1a7): undefined reference to `Rcpp::RObject::setSEXP(SEXPREC*)'</div></div><div><br></div><div>I'm assuming that these two errors are somewhat related, but can'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>