title: Using a c++ builder application with an external dll
body: <p>I'm trying to use an <code>external dll</code> in my c++ builder application. The dll (let.s call it X.dll) was created with Qt Creator (using MingW 32 bit compiler, tried gcc as well )
  and consists of a single functon to keep things simple (besides X.dll, an import library X.a is also created).</p>
  <p>The dll header (Dll_lib.h) is basically just</p>
  <pre><code>__declspec(dllexport)  Dll_method(float *p, int n);
  </code></pre>
  <p>If I create a simple Qt application, add the dll header to it and link it to the dll import library X.a, everythink works as expected.</p>
  <p>However, when I try to use the dll in my c++ builder application, I get an &quot;<em><strong>unresolved external _Dll_method referenced from ...</strong></em>&quot; error.</p>
  <p>The part of my c++ builder app that references the dll looks like</p>
  <pre><code>#include &quot;lib\Dll_lib.h&quot;
  
  #pragma comment(lib, &quot;X.lib&quot;)
  
  __declspec(dllimport)  Dll_method(float *p, int n);
  
  .....
  </code></pre>
  <p>X.lib was created directly from the dll using the implib tool that comes bundled with c++ builder.  I also tried to create X.lib from X.a using coff2omf tool but nothing worked and I always get the same error message.</p>