The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
When linking to a third party library it will often be necessary to explicitly specify a number of things:
#include
the header file in the C codePKG_CPPFLAGS
to nominate the search path for where
the header file may be found (-I
flag)PKG_LIBS
to specify
-L
flag)-l
flag)zlib
#include <R.h>
#include <Rinternals.h>
#include "zlib.h"
SEXP get_zlib_version(void) {
// const char * ZEXPORT zlibVersion(void);
return mkString(zlibVersion());
}
# include a search path for the library
compile(code, PKG_LIBS = "-L/local/libs -lz")
# Include a search path for the header
compile(code, PKG_LIBS = "-lz", PKG_CPPFLAGS = "-I/usr/local/include")
# Link to a drop-in replacement
compile(code, PKG_LIBS = "-lzlibng")
# Use "pkg-config" to automatically determine appropriate flags
compile(code, PKG_LIBS = "`pkg-config --libs zlib`",
PKG_CPPFLAGS = "`pkg-config --cflags zlib`")
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.