[Rcpp-devel] link issue when Rcpp package is installed in a path with space
Dirk Eddelbuettel
edd at debian.org
Thu Jul 12 03:05:49 CEST 2012
On 11 July 2012 at 20:18, Jiqiang Guo wrote:
| Dear List,
|
| From some reason, my Rcpp package on windows is installed in C:/Program Files/
Not "some reason" but the [badly chosen] default of the R Windows Installer.
The R-on-Windows FAQ, as I recall, recommends NOT to install in a path with
spaces.
| R/R-2.15.1/library/, which has a space in the path. So in the end, when
| compiling cpp code using inline package, I would have the following error,
| which prevent me using Rcpp at all.
|
| Compilation argument:
| C:/PROGRA~1/R/R-215~1.1/bin/i386/R CMD SHLIB file75c3d5d6216.cpp 2>
| file75c3d5d6216.cpp.err.txt
| g++ -I"C:/PROGRA~1/R/R-215~1.1/include" -DNDEBUG -I"C:/Program Files/R/
| R-2.15.1/library/Rcpp/include" -O2 -Wall -mtune=core2 -c
| file75c3d5d6216.cpp -o file75c3d5d6216.o
| g++ -shared -s -static-libgcc -o file75c3d5d6216.dll tmp.def file75c3d5d6216.o
| C:/Program Files/R/R-2.15.1/library/Rcpp/lib/i386/libRcpp.a -LC:/PROGRA~1/R/
| R-215~1.1/bin/i386 -lR
| g++.exe: error: C:/Program: No such file or directory
| g++.exe: error: Files/R/R-2.15.1/library/Rcpp/lib/i386/libRcpp.a: No such file
| or directory
|
| Could we add quotes to those the Rcpp libraries? It is easy to just fix for
| me on my computer, i.e., change file RcppLdpath.R
| (https://r-forge.r-project.org/scm/viewvc.php/pkg/Rcpp/R/RcppLdpath.R?view=
| markup&root=rcpp)
| and reinstall from source. But it would be nice that we do not have this
| issue in the next release.
Submit a patch, ideally with some demonstration of tests that it is
side-effect free.
As I recall, I once tried this and got into a frustrating cycle of required
fixes and I promised myself not to touch this again...
Dirk
--
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
More information about the Rcpp-devel
mailing list