Add support for loadable modules on POSIX systems

This commit is contained in:
Jason Turner
2009-09-06 23:33:03 +00:00
parent cba5731576
commit 7cc6a3cab9
10 changed files with 196 additions and 10 deletions

19
src/test_module.cpp Normal file
View File

@@ -0,0 +1,19 @@
#include <chaiscript/chaiscript.hpp>
#include <string>
std::string hello_world()
{
return "Hello World";
}
extern "C"
{
chaiscript::ModulePtr create_chaiscript_module_test()
{
chaiscript::ModulePtr m(new chaiscript::Module());
m->add(chaiscript::fun(hello_world), "hello_world");
return m;
}
}