[Rcpp-devel] Makevars problem when uploading package

Cedric Ginestet c.ginestet05 at googlemail.com
Wed Apr 6 10:57:33 CEST 2011


Hi Romain,

Thanks for your quick response. It works fine, now. I simply needed to 
add LinkingTo: Rcpp to my DESCRIPTION file, and using
PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"`

Thanks again,
Cedric


On 06/04/11 09:43, Romain Francois wrote:
> Hello,
>
> First, you don't need PKG_CPPFLAGS at all, just add:
>
> LinkingTo: Rcpp
>
> to your DESCRIPTION file.
>
>
> Then, please be specific about what you mean by "does not work".
>
> PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"`
>
> is what the documentation prescribes, so it should work.
>
> Romain
>
> Le 06/04/11 08:48, Cedric Ginestet a écrit :
>> Hi guys,
>>
>> I get the following error message from Kurt Hornik when uploading my
>> package to CRAN:
>> #################################
>>
>> * installing*source*  package‘NetworkAnalysis’  ...
>> ** libs
>> g++-4.6 -I/home/Hornik/tmp/R/include `Rscript -e 
>> 'Rcpp:::CxxFlags()'`  -I/usr/local/include    -fpic  -g -O2 -Wall 
>> -pedantic -c class.cpp -o class.o
>> g++-4.6: error: WARNING:: No such file or directory
>> g++-4.6: error: ignoring: No such file or directory
>> g++-4.6: error: environment: No such file or directory
>> g++-4.6: error: value: No such file or directory
>> g++-4.6: error: of: No such file or directory
>> g++-4.6: error: R_HOME: No such file or directory
>>
>> because your src/Makevars has
>>
>> PKG_CPPFLAGS=`Rscript -e 'Rcpp:::CxxFlags()'`
>> PKG_LIBS=`Rscript -e 'Rcpp:::LdFlags()'`
>>
>> #################################
>>
>> Yes, I have used the latter src/Makevars file because the use of
>> PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"`
>> does not work on my local machine, and therefore was not expected to
>> work externally. I am quite confused as to which route to take, here.
>>
>> Any help would be greatly appreciated,
>> -- 
>> Cedric Ginestet
>> Centre for Neuroimaging Sciences (L3.04)
>> NIHR Biomedical Research Centre
>> Institute of Psychiatry, Box P089
>> Kings College London
>> De Crespigny Park
>> London
>> SE5 8AF
>
>


More information about the Rcpp-devel mailing list