(Optional) Adding a Custom DLL

You might need to add third-party or custom dynamic link libraries (DLLs) in your applications. For example, you can use OpenCV to postprocess the YOLOv3 inference result.

To add a custom DLL, perform the following steps:

  1. Cross-compile the DLL.

    For details about the cross compilation procedure, see the corresponding document of the DLL in use. Note that the cross compiler must match the OS architecture of the operating environment.

  2. Create a directory for storing the DLL and copy or soft link the cross-compiled DLL to the directory. As shown in Figure 1, the lib directory is created to store libcustom.so.
    Figure 1 DLL directory

    Configure the DLL directory environment variable when setting the run configurations of the application project (Building and Running an Application Project). Configure the environment variable according to the directory of the main executable file (project_name/out/main). As shown in the screenshot, ../mylib indicates the DLL directory, which is under the project directory. Two configuration modes are provided:

    • Enter an environment variable in the Environment Variables text box, as shown in Figure 2.
      Figure 2 Entering an environment variable
    • Click . In the dialog box that is displayed, click and add an environment variable.
      Figure 3 Adding a member to the environment variable list