How to add shared library to nx plugin?

Completed

Comments

3 comments

  • Avatar
    Anton Babinov

    Hi Mohamed,

    I have created a shared library for some process. I would like to link the library to main nx plugin. I am not getting any error while building plugins. But, NX keeps on throwing undefined symbol error which causes my plugin to be not loaded successfully. 

    How did you link your library during compilation? Did you use static or dynamic linking? If you custom made shared library, I'd recommend to use static linking. Could you please give more details about the issue like:

    1. What is your dev environment - Linux/Windows?

    2. Which dev tools do you use for building your plugin?

    3. Could you please share undefined symbol error from mediaserver log?

     

    0
    Comment actions Permalink
  • Avatar
    Mohamed Thasin

    Hi Anton,

    1. What is your dev environment - Linux/Windows?

    I am using Linux (Ubuntu 20.04)

    2. Which dev tools do you use for building your plugin?

    I am using Visual Studio - GCC 9.3.0 

    3. Could you please share undefined symbol error from mediaserver log?

     

    {
    "error": "0",
    "errorString": "",
    "reply": {
    "{cf67e4d7-5688-7874-20df-53584f80a0b3}": [{
    "description": "",
    "errorCode": "cannotLoadLibrary",
    "homeDir": "/opt/networkoptix-metavms/mediaserver/bin/plugins/thasin_sample_plugin",
    "instanceIndex": -1,
    "isActive": true,
    "libName": "thasin_sample_plugin",
    "libraryFilename": "/opt/networkoptix-metavms/mediaserver/bin/plugins/thasin_sample_plugin/libthasin_sample_plugin.so",
    "mainInterface": "undefined",
    "name": "",
    "nxSdkVersion": "",
    "optionality": "nonOptional",
    "resourceBindingInfo": [],
    "status": "notLoadedBecauseOfError",
    "statusMessage": "Failed loading Server Plugin [/opt/networkoptix-metavms/mediaserver/bin/plugins/thasin_sample_plugin/libthasin_sample_plugin.so] (): [cannotLoadLibrary]: Cannot load library /opt/networkoptix-metavms/mediaserver/bin/plugins/thasin_sample_plugin/libthasin_sample_plugin.so: (/opt/networkoptix-metavms/mediaserver/bin/plugins/thasin_sample_plugin/libthasin_sample_plugin.so: undefined symbol: _ZN6thasin10VideoFrameD1Ev)",
    "vendor": "",
    "version": ""
    }]
    }
    }
    0
    Comment actions Permalink
  • Avatar
    Anton Babinov

    Could you please share how do you invoke library in your plugin and tell me compilation arguments? If that's a sample project, you can share it with me so I can take a look.

    0
    Comment actions Permalink

Please sign in to leave a comment.