[Rcpp-devel] LinkingTo: again

Dirk Eddelbuettel edd at debian.org
Sun Dec 13 20:40:33 CET 2009


(first off thanks for catching that on r-help -- appreciated!)

On 13 December 2009 at 20:06, Romain François wrote:
| Hi,
| 
| Coming back to this previous discussion.
| 
| Can we deploy the header files in the installed "include" directory of 
| Rcpp, so that a package can use LinkingTo: Rcpp and have the include 
| directory magically added to the -I paths.
| 
| I do this with parser and highlight, and it works fine : highlight uses 
| parser.h which lives in the include directory of parser.
| 
| So I have :
| 
| #include <parser.h>
| 
| in my C code.
| 
| and
| 
| LinkingTo: parser
| 
| in highlight's DESCRIPTION

I looked at this a few times in the past, and was quite excited about it.
But as I recall, I concluded it cannot work here because
 
  a) we would have to declare _every export interface_ including all member
     function slots etc pp -- that seems like an insance amout of work

  b) there was another C++ reason, it may have to do with the less-clearly
     defined signature the compiler generates so this may be C only

Now, you have some pretty magic coding chops, so maybe you get it to work.  I
didn't, and won't retry.

The inline stuff is useful though.  For the rest, I think configure +
Makevars can do it for us even across packages.  Yesterday I just spent some
time helping the phylobase package santize their use (where they still have
the insane method Dominick first set up where you build a static lib from
configure (!!) so that src/Makefile can link to it. Blargh.  Better now, but
haven't heard from them yet. See the top-level commit for phylobase on R-Forge.

Dirk

-- 
Three out of two people have difficulties with fractions.


More information about the Rcpp-devel mailing list