[Lemon-user] Integrating LGL with R via Rcpp
Alpár Jüttner
alpar at cs.elte.hu
Mon Feb 14 16:32:45 CET 2011
Hi,
>
> 2) Now, I'm thinking in this other option (which I do not test yet).
> Just copying
> the /lemon/ directory inside the src/ directory and access the .h
> files trough
> a line like (for example):
>
>
> #include "lemon/dijkstra.h"
>
>
> that is, now the .h files (I don't know what happens if there are or
> must be .so
> files in the Lemon library) are not accessed via the system PATHs, but
> directly inside the src/ directory. This option is in some way better
> for me
> (and maybe for others) if it works. Why? Simply, in this way one can
> build
> a self-sufficient R package that can be easily installed in other
> systems
> that uses R via a simple R command from a R console like this
> (suppose
> that the package is named LemonPkg):
>
> > install.packages("LemonPkg")
>
>
> and that is !!! You can use all the power of R (the main power of
> R is that it integrates conveniently a lot of libraries, also it
> seems
> a nice language to work with) and Lemon in a very easy way.
> But only if this second option works.
This should basically work, but with the following reservations:
* Each lemon header includes <lemon/config.h>, which in not in the
tarball, but instead it is generated from lemon/config.h.in or
from lemon/config.h.cmake (depending on the build system you
use) during the configuration phase.
* The easiest solution is to have cmake or ./configure
generate this file and use that, or
* a simple empty file will also serve quite well. (At the
price that some of the tools won't be able to handle the
'long long' type and the LP interface will be disables)
* There are some .cc files you should also compile. The only
crucial is base.cc, but color.cc (for the graphToEps() tool)
might also be good. All the remaining .cc files are of little
use for you (they are used by the LP interface and by
ArgParser).
Regards,
Alpar
More information about the Lemon-user
mailing list