Skip to main content

Deployment with thirdparty libraries

Planned

Comments

3 comments

  • Andrey Terentyev
    • Network Optix team

    Hello,

    By the linkt to the post you reffer there is a kay phrase

     Instead, the separate directory should be created with the same name a plugin has,

    In the log snippet you've shared, I see

    Server Plugin [C:/Program Files/Network Optix/Nx Witness/MediaServer/plugins/my_integration_plugin/my_integration_plugin.dll] (): [cannotLoadLibrary]: Cannot load library C:\Program Files\Network Optix\Nx Witness\MediaServer\plugins\trimmy_integration_plugin\my_integration_plugin.dll: 指定されたモジュールが見つかりません。

    In the first occurrence, the folder name is “my_integration_plugin”. In the second, it's "trimmy_integration_plugin".

    In the cmake file you've shared, the binary name is supposed to be "trimmy_integration_plugin"

    add_library(trimmy_integration_plugin SHARED ${TRIMMY_INTEGRATION_PLUGIN_SRC})

    That implies the folder name is to be “trimmy_integration_plugin”, thus the full path would comprise "C:/Program Files/Network Optix/Nx Witness/MediaServer/plugins/trimmy_integration_plugin/trimmy_integration_plugin.dll

    Please, check your naming.

    0
  • Fujiwara Daichi

    Thank you for reply.

     

    I changed folder name for security, so that's not problem.

     

    As you mentioned, actually output dll's name is trimmy_integration.dll.

     

    Apart from this, I want to know how to keep links to 3rd party libraries also while copying to other Windows environment.

    0
  • Andrey Terentyev
    • Network Optix team

    Hi,

    > I changed folder name for security, so that's not problem.

    I'm afraid, I have no idea what this means, but please keep in mind
    If the folder name does not comply with the rules described above the plugin binary won't be loaded.

    Here is the article that would help you to choose the proper solution meeting your requirements.

    https://support.networkoptix.com/hc/en-us/articles/360058885733-Loading-Plugins

    Please, refer to the Linked DLL lookup on Windows section, since you're using Windows.

    If the Plugin DLL resides in a directory with other Plugins — i.e. without a defined home directory (see above) — Nx Witness Server instructs Windows to look for DLLs which may be required for the Plugin’s DLL by using "default DLL search order" (defined by Windows), but excluding the current directory of the process.

    If the Plugin DLL resides in a dedicated directory (its home directory) with other DLLs that it uses, Nx Witness Server instructs Windows to look for those DLLs in the Plugin’s home directory instead of using "default DLL search order" (defined by Windows).

    More details on the default DLL search order can be found here.

    https://learn.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order

    So, as far as I understood, in your case, in the current configuration the solution would be copying all the dependency binary files (with no subfolders) to the plugin's home directory, i.e. C:/Program Files/Network Optix/Nx Witness/MediaServer/plugins/trimmy_integration_plugin

    0

Please sign in to leave a comment.