Use CxxWrap with embedded julia without shared lib

From example i saw that cxxwrap define some module like this

int greet()
{
    return 12;
}

void  define_julia_module(jlcxx::Module& mod)
{
    mod.method("greet", &greet);
}

We could create jlcxx::Module ++ several ways and i hope to bind functions without building shared dll.

I trying several functions from CxxWrap but everything is crash with read memory.

    jlcxx::cxxwrap_init();
    jl_module_t* module = jl_new_module(jl_symbol("example"), nullptr);
    jlcxx::Module& newModule = jlcxx::registry().create_module(module);
    newModule.method("greet", &greet);

Is it possible or its shared only by design? (jluna provide a way to bind functions embedded way)

Thanks!

I would assume that CxxWrap works only with shared libraries. Feel free to create a feature request for CxxWrap to make it work without.

I will try.
Watch their git, almost no activity detected. Read post on discourse that it’s a common situation for many julia repo.

This is just not true. Well, some repos are stable, so no activities needed. I know the main author of CxxWrap, he is a prof in Brussels, and profs are always busy. But he is active in the Julia community and will fix issues if needed.

It is strange that you call this “allmost no activity detected”:

1 Like

Understood.
Im count on my expirience with pybind11 and luasol which was commited almost every day (when im working with them). Change my opinion on activities.
Found similar to my issue in c++ repo of CxxWrap (its possibly not important for project).

Thanks