Skip to content
0
  • Recent
  • Tags
  • Popular
  • SAMSON Connect
  • Get SAMSON
  • Recent
  • Tags
  • Popular
  • SAMSON Connect
  • Get SAMSON
Collapse
SAMSON Forum
  1. Home
  2. Develop
  3. Apps
  4. DLL dependencies of an Element

DLL dependencies of an Element

Scheduled Pinned Locked Moved Apps
4 Posts 3 Posters 4.6k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A
    A
    Alain
    wrote on last edited by
    #1

    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?

    Best,
    Alain

    1 Reply Last reply
    0
    • J
      J
      Jocelyn
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      • A
        A
        Alain
        wrote on last edited by Alain
        #3

        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.

        1 Reply Last reply
        0
        • K
          K
          khushbu
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          -1

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Login or register to search.
          • First post
            Last post