Updated on 2025-12-10 GMT+08:00

Referencing DLLs in Functions

You can reference DLLs in functions as follows:

  • By default, the root directory and the lib folder in this directory have been configured in the LD_LIBRARY_PATH environment variable. You only need to add dynamic link libraries (DLLs) here.
  • You can directly modify the LD_LIBRARY_PATH variable in the code.

    For Python, after the interpreter is started and initialized, the operation of modifying the LD_LIBRARY_PATH variable in the code does not take effect on the loading of dynamic link libraries (DLLs). Therefore, the path of the DLLs that Python code depends on must be configured before the interpreter is started.

  • If the dependent .so file is stored in another directory, you can specify it when setting the LD_LIBRARY_PATH environment variable. For details, see Configuring Environment Variables.

    In the following example, /opt/function/code and /opt/function/code/lib indicate the project directories of the function code.

    Figure 1 Setting environment variables
  • If a library in a mounted file system is used, specify its directory in the LD_LIBRARY_PATH variable on the Configuration tab page.