DLL dependencies of an Element

  • Hi,

    The Element I am developing has dependencies to two other DLLs that are also part of my project. When I launch SAMSON, these DLLs are not found unless they are present in the PATH environment variable.

    How should I handle this case? Is it possible to install them automatically at some location recognized by SAMSON?

    And, for a later step: will it be possible to also upload them when uploading my Element to samson-connect?


  • Hi,
    For the moment there is no mechanism to do that with Samson. Is it possible for you to statically link to theses dll?
    When Samson starts it loads all Samson dll, then it iterate to all Samson elements dlls and do a dlopen on theses libraries.
    We have never tried to load this kind of library.
    It should work if you put the library in the same folder of Samson-core.exe
    Maybe this function can help : void QCoreApplication::addLibraryPath(const QString &path) (static)
    Or this one : DLL_DIRECTORY_COOKIE WINAPI AddDllDirectory(
    In PCWSTR NewDirectory

    Tell me if it solve your problem, and if yes we will think to add this possibility on Samson 0.8.0

    Best, Jocelyn

    I will try to test on a concrete example on Tuesday.

  • Thanks for the answer!

    Actually it is a total of three libraries:

    • the first one is a module that I load with dlopen. For this one I just implemented a solution where it is installed in the Element Resource directory from CMake, and I then fetch it with a path like SB_ELEMENT_PATH + "/Resource/MyLib.dll". This works.

    • the second one is a shared library on which the element directly depends. I fear I cannot use QCoreApplication::addLibraryPath because this library will be required before any code from the SAMSON Element can be executed. I will have a look if I can convert it to a static library.

    • the third one is the dynamic library for Intel TBB. One could require the user to install Intel TBB himself. Otherwise it is the same problem as for the second library above.

  • From here you can solve your issue related to the dll file, what you need to do is check missing Burutter.dll and copy the setting and save the dll file setting in your PC then you are able to replying of dll files.

Log in to reply

Looks like your connection to SAMSON Connect - Forum was lost, please wait while we try to reconnect.