Here’s what happens:
The examples are located in the SOURCE tarball distribution. And you do need the source in order to build the examples (so we figured we wouldn’t make them available separately).
So the general workflow is:
- build the plugin and turn the CPP into an libMyLibrary.so
- copy libMyLibrary.so where scidb can see it
- iquery -aq “load_library(‘MyLibrary’)”
- Now MyLibrary is usable: iquery -aq “my_library_operator(apply(A, my_library_function…))”
So, I have the source tree checked out and (after satisfying all the build dependencies, etc) I can say:
apoliakov@scalpel:~/scidb$ make more_math
Building CXX object examples/more_math/CMakeFiles/more_math.dir/more_math.cpp.o
Linking CXX shared library ../../bin/plugins/libmore_math.so
Built target more_math
So now that the plugin is built – I can load it into scidb. Where do I put the built .so file? If I am running from source (using runN.py) I can place the plugin into the directory scidb/bin/plugins and it will get loaded from there.
If I am running from a production-like environment, then there’s a config for where the plugins go. Here’s an example:
[scidb@bigboy ~]$ cat /opt/scidb/11.12/etc/config.ini
Note: plugins must be built on the same os that they’re executed on.
What’s the easiest way to create a custom plugin? I would probably grab the source tree. Look at more_math. Make a copy of the entire directory and add it to the right CMakeLists.txt files and go from there. Let us know how we can help…