Import C++ function from another package

How do I import a C++ function from another package for use in my package?

I would like to use the npermutations function from the arrangements package. There's an existing stack overflow answer to a similar question but I'm afraid it was all a bit too high level for me. It sounds like you can just use add the following as Roxygen2

@useDynLib arrangements npermutations

and then everything will work, but it doesn't... I didn't really expect it to since the original package author must make the functions available, is that correct? It's not really as easy as @UseDynLib, right?

Here is my error

Error in getNativeSymbolInfo(symNames, dll, unlist = FALSE, withRegistrationInfo = TRUE) : 
  must pass a package name, “DLLInfo” or “DllInfoReference” object

I also tried @useDynLib arrangements C_npermutations which gave the same error.

Thank you for your help!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.