[Rcpp-devel] RcppArmadillo and Rdefines

Charles Determan Jr deter088 at umn.edu
Wed Feb 25 20:57:20 CET 2015


William,

To close this point on the use of Rdefines.h on the list it was my
oversight to include all the R header files.  I have now removed them.  I
initially only retained those headers as the initial package contained
them.  I was unaware that Rcpp includes the necessary components and I can
use the Rf_ prefix.  The problem has now been solved as I use the Rf_
prefix and define R_NO_REMAP.

Regards,
Charles

On Wed, Feb 25, 2015 at 9:36 AM, William Dunlap <wdunlap at tibco.com> wrote:

> Why do you include "Rdefines.h" in your Rcpp code?  It contains errors
> (e.g., it leaves the initial Rf_ off of the length function).  Also, in my
> opinion, it is obsolete, especially for Rcpp code, since it is for writing
> code that works in R and S (including S+) and Rcpp will never work in S+.
>
> Bill Dunlap
> TIBCO Software
> wdunlap tibco.com
>
> On Wed, Feb 25, 2015 at 7:26 AM, Charles Determan Jr <deter088 at umn.edu>
> wrote:
>
>> I have finally solved the problem.  After coming across another posting
>> http://r.789695.n4.nabble.com/rtools-fstream-error-td4702713.html I
>> discovered the problem.  I needed to include #define R_NO_REMAP at the
>> start of my file and then append Rf_ to any function I use from
>> Rdefines.h.  The package now compiles without error.
>>
>> Thanks for your help Dirk, I know this was a long chain back and forth.
>>
>> Regards,
>> Charles
>>
>> On Wed, Feb 25, 2015 at 7:36 AM, Charles Determan Jr <deter088 at umn.edu>
>> wrote:
>>
>>> My apologies, I should have just did this from the start.  I thought it
>>> may be something simple.  I create a git repo to access the stripped down
>>> package (just the first cpp function and a simple R function).  If you
>>> clone it with:
>>>
>>> git clone https://github.com/cdeterman/test.git
>>>
>>> And try to build it you will get the errors I keep mentioning.  If you
>>> switch #include <RcppArmadillo.h> to <Rcpp.h> it will compile fine.
>>>
>>> I truly do appreciate the help from this list, thank you for taking the
>>> time for this.
>>>
>>> Best regards,
>>> Charles
>>>
>>> On Tue, Feb 24, 2015 at 3:52 PM, Dirk Eddelbuettel <edd at debian.org>
>>> wrote:
>>>
>>>>
>>>> Hi Charles,
>>>>
>>>> I understand this is frustrating for you but we are wasting everybody's
>>>> time
>>>> here.  Can you please prepare a minimally reproducible example?
>>>>
>>>> Also, maybe try some bisection. Does the problem go away after you
>>>> remove
>>>> bigmemory/bigalgebra?
>>>>
>>>> Dirk
>>>>
>>>> --
>>>> http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
>>>>
>>>
>>>
>>>
>>> --
>>> Dr. Charles Determan, PhD
>>> Integrated Biosciences
>>>
>>
>>
>>
>> --
>> Dr. Charles Determan, PhD
>> Integrated Biosciences
>>
>> _______________________________________________
>> Rcpp-devel mailing list
>> Rcpp-devel at lists.r-forge.r-project.org
>> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
>>
>
>


-- 
Dr. Charles Determan, PhD
Integrated Biosciences
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20150225/8ddaaf56/attachment.html>


More information about the Rcpp-devel mailing list