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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot