<div>
<p><font face="Arial" size="2">Binary Only Dll (test.dll) with the header file (test.h)</font></p>
<p><font face="Arial" size="2">-------------------------------------------------------------------------</font></p>
<p><font face="Arial" size="2">- I have a binary only dll (test.dll) that was created in windows which exports to functions </font></p>
<p><font face="Arial"><font size="2"><span class="941271205-19122005">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>- int Add (int, int) </font></font></p>
<p><font face="Arial"><font size="2"><span class="941271205-19122005">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>- int Subtract (int, int)</font></font></p>
<p><font face="Arial" size="2">- I want to use this dll in Linux from an application mydlltest.cpp. </font></p>
<p><font face="Arial"><font size="2"><span class="941271205-19122005">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>- In that process, I have tried the following:</font></font></p>
<p><font face="Arial"><font size="2"><span class="941271205-19122005">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>- Generated the .spec file using winedump</font></font></p>
<p><font face="Arial"><font size="2"><span class="941271205-19122005">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>- winedump spec test</font></font></p>
<p><font face="Arial"><font size="2"><span class="941271205-19122005">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>- This created the .spec file with stub functions</font></font></p>
<p><font face="Arial"><font size="2"><span class="941271205-19122005">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>1 stub add</font></font></p>
<p><font face="Arial"><font size="2"><span class="941271205-19122005">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>2 stub Subtract</font></font></p>
<p><font face="Arial"><font size="2"><span class="941271205-19122005">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>- Installed this dll as builtin dll in my wine directory (This is my testing purpose)</font></font></p>
<p><font face="Arial"><font size="2"><span class="941271205-19122005">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>- chmod a+x testdll_install</font></font></p>
<p><font face="Arial"><font size="2"><span class="941271205-19122005">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>- ./testdll_install &lt;wine_path&gt;</font></font></p>
<p><font face="Arial"><font size="2"><span class="941271205-19122005">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>- cd &lt;wine_path&gt;</font></font></p>
<p><font face="Arial"><font size="2"><span class="941271205-19122005">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>- autoconf</font></font></p>
<p><font face="Arial"><font size="2"><span class="941271205-19122005">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>- ./configure</font></font></p>
<p><font face="Arial"><font size="2"><span class="941271205-19122005">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>- make depend &amp;&amp; make</font></font></p>
<p><font face="Arial"><font size="2"><span class="941271205-19122005">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>- Now I am able to see this dll in dlls directory of winepath</font></font></p>
<p><font face="Arial" size="2">I am not finding any README on Winebuild and I am getting problem from this step onwards, </font></p>
<p><font face="Arial" size="2">- NOW do I need to generate the .def for the spec file of the dll??</font></p>
<p><font face="Arial" size="2">- NOW do I need to change any settings like DllOverrides to access this dll from my test application??</font></p>
<p><font face="Arial" size="2"></font>&nbsp;</p>
<p><font face="Arial" size="2">- Now I have a win32 application (mydlltest.cpp) that was using this dll in windows.</font></p>
<p><font face="Arial" size="2"></font></p>
<p><font face="Arial" size="2">- How can I link the (test.dll) from the application (mydlltest.cpp) ?</font></p>
<p><font face="Arial"><font size="2"><span class="941271205-19122005">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>- I use the LoadLibrary(&quot;test&quot;) in the test application (mydlltest.cpp), the dll was loaded </font></font></p>
<p><font face="Arial"><font size="2"><span class="941271205-19122005">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>- I got the GetProcAddress() for the function &quot;Add&quot;, the function pointer is obtained</font></font></p>
<p><font face="Arial"><font size="2"><span class="941271205-19122005">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>- <strong>But when I call the function &quot;add&quot; from the application, I was getting exception</strong>.</font></font></p>
<p><font face="Arial"><font size="2"><span class="941271205-19122005">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>- Then I define the stub function in the test_dll_main.c, to print a trace message.</font></font></p>
<p><font face="Arial"><font size="2"><span class="941271205-19122005">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>- Compiled the dll again to create the <a href="http://test.dll.so">test.dll.so</a></font></font></p>
<p><font face="Arial"><font size="2"><span class="941271205-19122005">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>- Now, when I call the function &quot;add&quot; from the application, the trace message is printed, BUT THE ACTUAL FUNCTION IN THE 
TEST.DLL is not called.</font></font></p>
<p><font face="Arial"><font size="2"><strong><span class="941271205-19122005">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>(I Created the .def file from the .spec file of the dll and tried the same. Still I am getting the same problem)</strong></font>
</font></p>
<p><font face="Arial" size="2"><strong></strong></font></p>
<p><font face="Arial"><font size="2"><strong><span class="941271205-19122005">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>How I can use winebuild after creating the .spec file using winedump, so that I can link that dll using the Application.??</strong>
</font></font></p>
<p><font face="Arial"><font size="2"><strong><span class="941271205-19122005">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Any detailed steps that can help in using a third party binary dll in Linux using the Test Applciation ??</strong></font></font>
</p>
<p><font face="Arial" size="2">Thank you</font></p>
<p><font face="Arial" size="2">AJ</font></p><a title="mailto:wine-devel-bounces@winehq.org" href="mailto:wine-devel-bounces@winehq.org"></a></div>