opencog-dev team mailing list archive
-
opencog-dev team
-
Mailing list archive
-
Message #00269
libatomspace branch
Hi all,
I've pushed an experimental "libatomspace" branch to
lp:~gama/opencog/libatomspace. This branch will hopefully bring us
closer to turning opencog into a real framework. I've converted the
libatomspace & libserver internal convenience libraries into 'real'
external libraries. Additionally, I've changed the CogServer's internals
so that it is now possible to extend it. These were two direct
requirements from the Petaverse port to opencog (which is being handled
by Erickson, btw). I believe that as the port progresses, he'll find a
few other issues with the current opencog structure, but this should be
enough for them to get going.
Now, about the patch itself: there were two side-effect of turning
libatomspace and libserver into real libraries: 1) the 'src' dir was
renamed to 'opencog' (because we need to export the header files with
prefixed '#include's); and 2) the libraries are now SHARED and not
STATIC.
A direct consequence of 1) is that pretty much all source files had to
be touched because I had to change all the internal opencog '#include's
non-local prefixed includes. So, '#include "AtomSpace.h"' is now
'#include <opencog/atomspace/AtomSpace.h>'.
Also, since there's now a split between framework vs client code (at
least that's what I'm trying to achieve :-)), I've chosen to move the
'examples' dir to the root of the tree as these files are not really a
part of the opencog framework but rather client/demo applications that
use it.
I also added the CMAKE directives to support "make install". To change
the install prefix, use the parameter
"-DCMAKE_INSTALL_PREFIX:STRING=<path>":
prompt$ cmake -DCMAKE_INSTALL_PREFIX:STRING=/usr .
prompt$ make && sudo make install
Finally, to ease the task of building a project that uses the new
opencog libraries, I've added the FindOPENCOG.cmake. See the
lp:~gama/opencog/derivedserver demo application tree for an example.
(quick tip: if want to try the example application, make sure to pass
the "-DOPENCOG_HOME:STRING=<opencog-prefix>" to cmake).
Let me know if you find any problems (specially you Erickson!). Comments
are welcome, as always...
--
Gustavo
Follow ups