[Rcpp-devel] sourceCpp and #include .hpp ?

Tal Galili tal.galili at gmail.com
Tue Aug 20 05:33:49 CEST 2013


Thank you Kevin and Dirk,
I was hoping for for an easier fix (such as, having sourceCpp give a
parameter controlling where it was building the thing).
Thank you both for the explanations.

Best,
Tal




----------------Contact
Details:-------------------------------------------------------
Contact me: Tal.Galili at gmail.com |
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
www.r-statistics.com (English)
----------------------------------------------------------------------------------------------



On Tue, Aug 20, 2013 at 2:54 AM, Dirk Eddelbuettel <edd at debian.org> wrote:

>
> On 19 August 2013 at 11:51, Kevin Ushey wrote:
> | If you run sourceCpp(..., verbose=TRUE), you'll see that the source code
> is
> | copied into a temporary directory, and then the working directory is
> reset to
> | that directory. So the header file is no longer discovered there. (not to
>
> Correct.  [ A colleague was just bitten / frustrated by that today. ]
>
> | mention, you would have to tell sourceCpp where to find those function
> | definitions that have been included as well... building a package does
> that
> | behind the scenes for you)
> |
> | I think you should stay with recompiling the package, rather than
> switching to
> | sourceCpp, when debugging a package.
>
> You can also use a standard -I/some/path/... switch --- but for the reason
> Kevin explained so nicely (ie R building in a temp. dir) you cannot just
> say
> "use my local dir" via -I. but have to be explicit: -I/home/tal/some/dirk
> or,
> if you must -IC:/some/win/doze/path.
>
> Longer-term, a package is your friend. And hey, you already have one :)
>
> Dirk
>
> --
> Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20130820/4796869f/attachment.html>


More information about the Rcpp-devel mailing list