Embedding a custom Julia module in C++

Hello, I’m trying to do something very similar to Import custom Julia module from C & use it:

but in C++. I’ve tried compiling this example in C++, but I am receiving null output from the function. As suggested, I’m doing

jl_eval_string(“using .custom_module”); 

After the line

jl_eval_string("Base.include(Main, \"./test.jl\")"); 

I’ve added :

if (jl_exception_occurred())
printf("%s \n", jl_typeof_str(jl_exception_occurred()));

This outputs “ErrorException”

I’m working in Ubuntu 20.04, and Julia v1.5. I’ve also played around with setting the environmental variable JULIA_LOAD_PATH to include the location of test.jl, but still no luck.

An suggestions on what I’m missing?