Search code examples
c++sgxchaiscript

Using Chaiscript without dynamically loaded libraries


I'm working with Intel SGX and would like to use Chaiscript inside an enclave. SGX forbids the use of dynamically loaded libraries inside an enclave. Is there any way to use Chaiscript in such ways (I cannot compile using the "-ldl" parameter)?


Solution

  • Since ChaiScript 6.0 the standard library has been compiled into ChaiScript itself. So that aspect does not need -ldl.

    What you are looking for is the -DCHAISCRIPT_NO_DYNLOAD option, which completely disables the ability to dynamically load libraries and does not require linking against the dynamic loader.