<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    Sorry, I forgot to mention that I'm already using both current MSVC
    32-bit packages. They're installed at the default location under
    C:\gstreamer. To deploy 'my' DLL, I threw the necessary gstreamer
    DLLs into the same folder and copied the whole parent directory to
    another PC.<br>
    <br>
    <br>
    <div class="moz-cite-prefix">Am 22.03.22 um 16:26 schrieb David Ing:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAKF2gC_=eOdAShayx7o7CGiq442=5rdEntDnNmJb7m3D6MT3ZQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">I don't know what might be causing this, but you
        might save yourself some time by skipping the build and using
        the MSVC installers to get the build artifacts.  (The MSVC is
        less buggy than the MinGW.)
        <div><br>
        </div>
        <div>What I do is I install the "runtime installer" and
          "development installer", then I copy the components from
          C:\gstreamer (or wherever) into a portable little "package"
          that my C++ code can reference.</div>
        <div><br>
        </div>
        <div>After you run the installers, check your environment for
          variable names that begin with GST, and your path for anything
          like "C:\gstreamer\...", and purge all of that.</div>
        <div><br>
        </div>
        <div>BTW, my C++ application does a bit of environmental
          housekeeping just before I initialize gstreamer (with
          gst_init).  I'm not sure if this stuff is necessary but it
          works for us.</div>
        <div><br>
        </div>
        <div>
          <pre style="color:rgb(32,32,32);font-family:"JetBrains Mono",monospace;font-size:7.5pt">            <span style="color:rgb(56,56,56);font-style:italic">//</span><span style="color:rgb(36,135,0);font-style:italic"> This is where the plugins live.
</span><span style="color:rgb(36,135,0);font-style:italic">            </span><span style="color:rgb(107,47,186)">boost</span><span style="color:rgb(56,56,56)">::</span><span style="color:rgb(107,47,186)">filesystem</span><span style="color:rgb(56,56,56)">::</span>path pluginFolder <span style="color:rgb(56,56,56)">=</span> assemblyFolder <span style="color:rgb(56,56,56)">/ "</span><span style="color:rgb(140,108,65)">plugins</span><span style="color:rgb(56,56,56)">";
</span><span style="color:rgb(56,56,56)">
</span><span style="color:rgb(56,56,56)">            </span><span style="color:rgb(56,56,56);font-style:italic">//</span><span style="color:rgb(36,135,0);font-style:italic"> WARNING: setting an environment variable is only safe at the beginning of the program (before any
</span><span style="color:rgb(36,135,0);font-style:italic">            </span><span style="color:rgb(56,56,56);font-style:italic">//</span><span style="color:rgb(36,135,0);font-style:italic"> other threads have been spun up).  We do this to maintain strict control over the components that
</span><span style="color:rgb(36,135,0);font-style:italic">            </span><span style="color:rgb(56,56,56);font-style:italic">//</span><span style="color:rgb(36,135,0);font-style:italic"> we are using.
</span><span style="color:rgb(36,135,0);font-style:italic">            </span><span style="color:rgb(15,84,214)">const char</span><span style="color:rgb(56,56,56)">*</span> priorGstPluginPath <span style="color:rgb(56,56,56)">= </span><span style="color:rgb(0,133,95)">g_getenv</span><span style="color:rgb(56,56,56)">("</span><span style="color:rgb(140,108,65)">GST_PLUGIN_PATH</span><span style="color:rgb(56,56,56)">");
</span><span style="color:rgb(56,56,56)">            </span><span style="color:rgb(107,47,186)">std</span><span style="color:rgb(56,56,56)">::</span>string gstPluginPath <span style="color:rgb(56,56,56)">= </span><span style="color:rgb(107,47,186)">string</span><span style="color:rgb(56,56,56)">::</span><span style="color:rgb(0,133,95)">unwiden</span><span style="color:rgb(56,56,56)">(pluginFolder.</span><span style="color:rgb(0,133,95)">string</span><span style="color:rgb(56,56,56)">());
</span><span style="color:rgb(56,56,56)">            </span><span style="color:rgb(15,84,214)">if </span><span style="color:rgb(56,56,56)">(</span>priorGstPluginPath <span style="color:rgb(56,56,56)">&& (</span>0 <span style="color:rgb(56,56,56)">!= priorGstPluginPath[</span>0<span style="color:rgb(56,56,56)">]))
</span><span style="color:rgb(56,56,56)">            {
</span>                gstPluginPath <span style="color:rgb(56,56,56)">=</span> gstPluginPath <span style="color:rgb(56,56,56)">+</span> PATHS_SEP_STR <span style="color:rgb(56,56,56)">+</span> priorGstPluginPath<span style="color:rgb(56,56,56)">;
</span><span style="color:rgb(56,56,56)">            }
</span><span style="color:rgb(56,56,56)">
</span><span style="color:rgb(56,56,56)">            </span><span style="color:rgb(0,133,95)">g_unsetenv</span><span style="color:rgb(56,56,56)">("</span><span style="color:rgb(140,108,65)">GST_PLUGIN_SYSTEM_PATH_1_0</span><span style="color:rgb(56,56,56)">");
</span><span style="color:rgb(56,56,56)">            </span><span style="color:rgb(0,133,95)">g_unsetenv</span><span style="color:rgb(56,56,56)">("</span><span style="color:rgb(140,108,65)">GST_PLUGIN_SYSTEM_PATH</span><span style="color:rgb(56,56,56)">");
</span><span style="color:rgb(56,56,56)">            </span><span style="color:rgb(0,133,95)">g_unsetenv</span><span style="color:rgb(56,56,56)">("</span><span style="color:rgb(140,108,65)">GST_PLUGIN_PATH_1_0</span><span style="color:rgb(56,56,56)">");
</span><span style="color:rgb(56,56,56)">
</span><span style="color:rgb(56,56,56)">#</span><span style="color:rgb(15,84,214)">if </span><span style="color:rgb(0,133,95)">ARCH_32_BIT
</span>            g_unsetenv("GSTREAMER_ROOT_X86");
            <span style="color:rgb(0,133,95)">g_unsetenv</span><span style="color:rgb(56,56,56)">("</span><span style="color:rgb(140,108,65)">GSTREAMER_ROOT_MSVC_X86</span><span style="color:rgb(56,56,56)">");
</span><span style="color:rgb(56,56,56)">            </span><span style="color:rgb(0,133,95)">g_setenv</span><span style="color:rgb(56,56,56)">("</span><span style="color:rgb(140,108,65)">GSTREAMER_1_0_ROOT_X86</span><span style="color:rgb(56,56,56)">", </span><span style="color:rgb(107,47,186)">string</span><span style="color:rgb(56,56,56)">::</span><span style="color:rgb(0,133,95)">unwiden</span><span style="color:rgb(56,56,56)">(assemblyFolder.</span><span style="color:rgb(0,133,95)">string</span><span style="color:rgb(56,56,56)">()).</span><span style="color:rgb(0,133,95)">c_str</span><span style="color:rgb(56,56,56)">(), </span><span style="color:rgb(0,147,161);font-weight:bold">true</span><span style="color:rgb(56,56,56)">);
</span><span style="color:rgb(56,56,56)">            </span><span style="color:rgb(0,133,95)">g_setenv</span><span style="color:rgb(56,56,56)">("</span><span style="color:rgb(140,108,65)">GSTREAMER_1_0_ROOT_MSVC_X86</span><span style="color:rgb(56,56,56)">", </span><span style="color:rgb(107,47,186)">string</span><span style="color:rgb(56,56,56)">::</span><span style="color:rgb(0,133,95)">unwiden</span><span style="color:rgb(56,56,56)">(assemblyFolder.</span><span style="color:rgb(0,133,95)">string</span><span style="color:rgb(56,56,56)">()).</span><span style="color:rgb(0,133,95)">c_str</span><span style="color:rgb(56,56,56)">(), </span><span style="color:rgb(0,147,161);font-weight:bold">true</span><span style="color:rgb(56,56,56)">);
</span><span style="color:rgb(56,56,56)">#</span><span style="color:rgb(15,84,214)">elif</span> ARCH_64_BIT
            <span style="color:rgb(0,133,95)">g_unsetenv</span><span style="color:rgb(56,56,56)">("</span><span style="color:rgb(140,108,65)">GSTREAMER_ROOT_X86_64</span><span style="color:rgb(56,56,56)">");
</span><span style="color:rgb(56,56,56)">            </span><span style="color:rgb(0,133,95)">g_unsetenv</span><span style="color:rgb(56,56,56)">("</span><span style="color:rgb(140,108,65)">GSTREAMER_ROOT_MSVC_X86_64</span><span style="color:rgb(56,56,56)">");
</span><span style="color:rgb(56,56,56)">            </span><span style="color:rgb(0,133,95)">g_setenv</span><span style="color:rgb(56,56,56)">("</span><span style="color:rgb(140,108,65)">GSTREAMER_1_0_ROOT_X86_64</span><span style="color:rgb(56,56,56)">", </span><span style="color:rgb(107,47,186)">string</span><span style="color:rgb(56,56,56)">::</span><span style="color:rgb(0,133,95)">unwiden</span><span style="color:rgb(56,56,56)">(assemblyFolder.</span><span style="color:rgb(0,133,95)">string</span><span style="color:rgb(56,56,56)">()).</span><span style="color:rgb(0,133,95)">c_str</span><span style="color:rgb(56,56,56)">(), </span><span style="color:rgb(0,147,161);font-weight:bold">true</span><span style="color:rgb(56,56,56)">);
</span><span style="color:rgb(56,56,56)">            </span><span style="color:rgb(0,133,95)">g_setenv</span><span style="color:rgb(56,56,56)">("</span><span style="color:rgb(140,108,65)">GSTREAMER_1_0_ROOT_MSVC_X86_64</span><span style="color:rgb(56,56,56)">", </span><span style="color:rgb(107,47,186)">string</span><span style="color:rgb(56,56,56)">::</span><span style="color:rgb(0,133,95)">unwiden</span><span style="color:rgb(56,56,56)">(assemblyFolder.</span><span style="color:rgb(0,133,95)">string</span><span style="color:rgb(56,56,56)">()).</span><span style="color:rgb(0,133,95)">c_str</span><span style="color:rgb(56,56,56)">(), </span><span style="color:rgb(0,147,161);font-weight:bold">true</span><span style="color:rgb(56,56,56)">);
</span><span style="color:rgb(56,56,56)">#</span><span style="color:rgb(15,84,214)">else
</span><span style="color:rgb(15,84,214)">  </span><span style="color:rgb(56,56,56)">#</span><span style="color:rgb(15,84,214)">error </span><span style="color:rgb(56,56,56)">"</span><span style="color:rgb(140,108,65)">Unknown architecture (32-bit vs. 64-bit)</span><span style="color:rgb(56,56,56)">"
</span><span style="color:rgb(56,56,56)">#</span><span style="color:rgb(15,84,214)">endif
</span><span style="color:rgb(15,84,214)">
</span><span style="color:rgb(15,84,214)">            </span><span style="color:rgb(0,133,95)">g_setenv</span><span style="color:rgb(56,56,56)">("</span><span style="color:rgb(140,108,65)">GST_PLUGIN_PATH</span><span style="color:rgb(56,56,56)">", gstPluginPath.</span><span style="color:rgb(0,133,95)">c_str</span><span style="color:rgb(56,56,56)">(), </span><span style="color:rgb(0,147,161);font-weight:bold">true</span><span style="color:rgb(56,56,56)">);
</span><span style="color:rgb(56,56,56)">
</span><span style="color:rgb(56,56,56)">#</span><span style="color:rgb(15,84,214)">if </span><span style="color:rgb(0,133,95)">BOOST_OS_WINDOWS
</span>            // The nuget package provides some modules that are needed to enable some fancy network encryption stuff, but
            <span style="color:rgb(56,56,56);font-style:italic">//</span><span style="color:rgb(36,135,0);font-style:italic"> I have only seen it available on Windows.  Perhaps it is not required on Linux.  We only need it on Windows
</span><span style="color:rgb(36,135,0);font-style:italic">            </span><span style="color:rgb(56,56,56);font-style:italic">//</span><span style="color:rgb(36,135,0);font-style:italic"> because it enables a feature that enables WebRTC in our Windows client aplications.
</span><span style="color:rgb(36,135,0);font-style:italic">            </span><span style="color:rgb(107,47,186)">boost</span><span style="color:rgb(56,56,56)">::</span><span style="color:rgb(107,47,186)">filesystem</span><span style="color:rgb(56,56,56)">::</span>path gioModuleFolder <span style="color:rgb(56,56,56)">=</span> assemblyFolder <span style="color:rgb(56,56,56)">/ "</span><span style="color:rgb(140,108,65)">gio_modules</span><span style="color:rgb(56,56,56)">";
</span><span style="color:rgb(56,56,56)">            </span><span style="color:rgb(107,47,186)">std</span><span style="color:rgb(56,56,56)">::</span>string gioModuleFolderString <span style="color:rgb(56,56,56)">= </span><span style="color:rgb(107,47,186)">string</span><span style="color:rgb(56,56,56)">::</span><span style="color:rgb(0,133,95)">unwiden</span><span style="color:rgb(56,56,56)">(gioModuleFolder.</span><span style="color:rgb(0,133,95)">string</span><span style="color:rgb(56,56,56)">());
</span><span style="color:rgb(56,56,56)">            </span><span style="color:rgb(0,133,95)">g_setenv</span><span style="color:rgb(56,56,56)">("</span><span style="color:rgb(140,108,65)">GIO_MODULE_DIR</span><span style="color:rgb(56,56,56)">", gioModuleFolderString.</span><span style="color:rgb(0,133,95)">c_str</span><span style="color:rgb(56,56,56)">(), </span><span style="color:rgb(0,147,161);font-weight:bold">true</span><span style="color:rgb(56,56,56)">);
</span><span style="color:rgb(56,56,56)">#</span><span style="color:rgb(15,84,214)">endif</span></pre>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Tue, Mar 22, 2022 at 4:52
          AM MK via gstreamer-devel <<a
            href="mailto:gstreamer-devel@lists.freedesktop.org"
            moz-do-not-send="true" class="moz-txt-link-freetext">gstreamer-devel@lists.freedesktop.org</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
          <br>
          I've written a DLL plugin for a 3rd party application which
          initially<br>
          only used libjpeg for motion JPEG support. I used a
          VisualStudio (2017)<br>
          template which the 3rd party supplier provides as starting
          point. That<br>
          worked fine.<br>
          <br>
          To be able to support other stream formats, I switched to
          gstreamer<br>
          instead of libjpeg. I can build the plugin and it works fine
          on the PC<br>
          where it was compiled (let's call it PC1). When I copy all the
          files to<br>
          another PC (PC2), the 3rd party application fails to load the
          DLL,<br>
          because of some missing DLL dependencies. When I compile the
          project on<br>
          PC2, it works well on PC2. But the version from PC2 fails on
          PC1.<br>
          <br>
          I checked the dependencies with 'Dependencies' and noticed
          that on PC1<br>
          the missing DLLs differ from the missing DLLs on PC2. But even
          the<br>
          required DLLs differ from PC1 to PC2.<br>
          <br>
          Does anyone have an idea what could cause this behavior?<br>
          <br>
          Best regards,<br>
          Michael<br>
          <br>
          PS: both versions do not run on PC3.<br>
        </blockquote>
      </div>
    </blockquote>
    <br>
  </body>
</html>