On 12 July 2016 at 19:33, Leo Leo wrote: | Dear Rcpp_devel enthusiats, | | May I ask you for exploiting your potential? I am working on a package to | handle seismic data (https://github.com/coffeemuggler/eseis). | | A key task is to be able to read and write the so called miniseed format. There | is a C-library for this job (https://seiscode.iris.washington.edu/projects/ | libmseed/files). | | What would be needed to implement this library to my package? The goal would be | to have functions like read_mseed(file, ...) and write_mseed(data, file, ...). | According to the library documentation the functions that do this are | ms_readmsr(3) and ms_readtraces(3) as well as mst_pack(3) and mst_writemseed | (3).
The very simplest option is probably to just copy the content of the library itself -- ie the *.c (or *.cpp) and *h files -- to your package's src/ directory. That way the content is present and can be used by your add-on functions. A slightly better and more involved option is to keep it in a subdirectory and have it built, say during configure. You package then points to that (static) library from its src/Makevars. There are other options. But all this somehow requires you to know a little bit about library building, which then becomes OS-dependent as this is different between Linux and OS X, not to mention Windows. | As usual, the question is rather simple but I have no idea if the answer can | also be that simple. I would greatly appreciate your help and be delighted if | you could help me with this major step. I fear there is no super-simple answer. Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org _______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel