[Rcpp-devel] Question regarding integrating preexisting C++ code via Rcpp

Darren Cook darren at dcook.org
Wed Oct 12 01:24:20 CEST 2011


> My apologies for not posting comprehensive code. My intention was only to
> lessen the reading burden for you.

Don't post comprehensive code :-)
But if you can discover the smallest possible example that shows the
problem, that will encourage lots of helpful responses.


> I am currently getting this error:
> 
> /home/simon/College/PackageOne/src/BZip/BinaryTree.h: In function ‘SEXPREC*
> file354d98a8(SEXPREC*, SEXPREC*)’:
> /home/simon/College/PackageOne/src/BZip/BinaryTree.h:8:1: error: expected
> primary-expression before ‘template’
> /home/simon/College/PackageOne/src/BZip/BinaryTree.h:8:1: error: expected
> ‘;’ before ‘template’


This is saying that you've not finished a statement before defining
another one. E.g. see
  http://stackoverflow.com/questions/3221422/gcc-template-error

It could mean a missing semi-colon in the file being included before
this one. If there are no statements or #include lines before line 8 in
BinaryTree.h, look at the files that include BinaryTree.h.

>  I think I can see a quick solution, (not to use the template - I don''t
> need genericity here anyway,)...

If that is true, then the Smallest Possible Example would be very
interesting to the Rcpp developers, I'm sure.

Darren


-- 
Darren Cook, Software Researcher/Developer

http://dcook.org/work/ (About me and my work)
http://dcook.org/blogs.html (My blogs and articles)


More information about the Rcpp-devel mailing list