[Rcpp-devel] LinkingTo: again

Romain François francoisromain at free.fr
Sun Dec 13 21:59:07 CET 2009


On 12/13/2009 09:57 PM, Romain François wrote:
> On 12/13/2009 09:39 PM, Dirk Eddelbuettel wrote:
>>
>> On 13 December 2009 at 21:06, Romain François wrote:
>> | No, you don't need to do any of that. you can if you want (I think you
>> | define what Matrix uses), but you don't have to. As far as I can see
>> it,
>> | adding "LinkingTo: foo" to the DESCRIPTION file just adds
>> | -Isomewhere/foo/include so that you can then do #include<somefile.h>
>> | where somefile.h is in the somewhere/foo/include directory.
>> |
>> | This is it, no voodoo needed.
>>
>> Then that passes the _compile_ stage as you find headers and the blows up
>> when the _linking_ stage finds no object code.
>>
>> Some voodoo needed, after all. ;-)
>>
>> [ That is, unless you're Whit Armstrong and you do everything in C++
>> templates without object code. Rcpp will need -lRcpp to be found
>> somewhere. ]
>>
>> I looked at what Martin had suggested and it is all C code. So no example
>> there either.
>>
>> Dirk
>
> This is what I've just realized when trying to make an example
> (attached).

BTW, this example assumes that the lib directory was copied over to include.

> now I understand your point.
>
> Then I think this is a feature request for R-devel. Having LinkingTo C++
> compatible if we follow the convention (yours) of :
> - having a lib directory at the root of the installed package
> - containing headers and and a shared object
>
> then LinkingTo would add the -L, -l where appropriate.
>
> Romain

-- 
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://tr.im/HlX9 : new package : bibtex
|- http://tr.im/Gq7i : ohloh
`- http://tr.im/FtUu : new package : highlight



More information about the Rcpp-devel mailing list