Ok, please forgive my naivety but this is my first attempt and all,<br><br>I am lost and need come guidance, the guide is of some help and so is looking at the opengl files. I am not sure exactly what I am trying to write. What is the difference between a dll form Wine and a dll.so? I know the dll.so end up in your linux /lib folder right? How does a dll communicate to this dll.so? How am I to write this dll file so that when the fah gpu app calls for a function the cudart.dll file acts as a link to the libcudart.so.2.0? I don&#39;t want to attempt to rewrite the entire dll if I don&#39;t have to. To me it just seems like I am not getting the picture. I know we can&#39;t simply link the two files because they are in two different formats ELF vs PE. Is there a good example on how this is done? I&#39;m sure this has been done before. Again looking to the opengl_norm.c file all it appears is that every functions has been rewritten but with &quot;wine_&quot; in front of the function name. Is that all I need to do with the cudart? That just seem right.<br>
<br>I probably should even be messing with this stuff, but the beautify of open source applications is that with a little help from the community I can add in support for things I need (CUDA). If this was a closed source app, I would have to just put in a request for it and maybe in a few months or so they might think about adding support.<br>
<br><br>Thanks for your patience and help<br><br><div class="gmail_quote">On Sun, Jul 6, 2008 at 10:13 PM, Stefan D�singer &lt;<a href="mailto:stefan@codeweavers.com">stefan@codeweavers.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">









<div link="blue" vlink="purple" lang="EN-US">

<div>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">Yes, this guide is reasonable, except probably the building
part. You *may* want to write this DLL as part of Wine, although I am afraid
that we don&#39;t have a policy how to deal with non-Windows DLLs(since cuda is an
Nvidia thing, not from MS). Of course the 5.5 part doesn&#39;t apply then as well.</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">&nbsp;</span></p>

<div style="border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color blue; border-width: medium medium medium 1.5pt; padding: 0in 0in 0in 4pt;">

<div>

<div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">

<p><b><span style="font-size: 10pt;" lang="DE">From:</span></b><span style="font-size: 10pt;" lang="DE">
<a href="mailto:wine-devel-bounces@winehq.org" target="_blank">wine-devel-bounces@winehq.org</a> [mailto:<a href="mailto:wine-devel-bounces@winehq.org" target="_blank">wine-devel-bounces@winehq.org</a>] <b>On
Behalf Of </b>Seth Shelnutt<br>
<b>Sent:</b> Sunday, July 06, 2008 6:29 PM<br>
<b>To:</b> Michael Karcher<br>
<b>Cc:</b> <a href="mailto:wine-devel@winehq.org" target="_blank">wine-devel@winehq.org</a><br>
<b>Subject:</b> Re: CUDA wrapper</span></p>

</div>

</div><div><div></div><div class="Wj3C7c">

<p>&nbsp;</p>

<p style="margin-bottom: 12pt;">I writing a wrapper, would it
be correct to more or less follow this guide, on winelib dll&#39;s? <a href="http://www.winehq.org/site/docs/winelib-guide/bindlls" target="_blank">http://www.winehq.org/site/docs/winelib-guide/bindlls</a><br>
<br>
I&#39;ve never coded anything for Wine before so I want to make sure I do it right
from the beginning instead of having to go back and make drastic changes.<br>
<br>
I&#39;ll be looking at that opengl32 perl script because there is 102 pages of
functions that cudart.dll and libcudart.so both contain.<br>
<br>
</p>

<div>

<p>On Sun, Jul 6, 2008 at 6:53 PM, Michael Karcher &lt;<a href="mailto:wine@mkarcher.dialup.fu-berlin.de" target="_blank">wine@mkarcher.dialup.fu-berlin.de</a>&gt;
wrote:</p>

<p>This is not going to work. PE style dynamic linking works
quite<br>
different from ELF style dynamic linking. Wine can not link native ELF<br>
libraries to windows applications. The .dll.so files from wine are<br>
special in being ELF files but containing extra information that allows<br>
the Wine dynamic linker to link it into PE processes.</p>

<div>

<p>&nbsp;</p>

</div>

<blockquote style="border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color rgb(204, 204, 204); border-width: medium medium medium 1pt; padding: 0in 0in 0in 6pt; margin-left: 4.8pt; margin-right: 0in;">


<div>

<p>&nbsp;</p>

</div>

<p style="margin-bottom: 12pt;">This is right. You need at
least a correct .spec file to make a wine<br>
dll. You still have to implement a wrapper for each function, as Windows<br>
usually uses the stdcall calling convention, whereas linux uses cdecl by<br>
default. There might be some way to automate writing the wrapper<br>
functions.<br>
<br>
Regards,<br>
<span style="color: rgb(136, 136, 136);">&nbsp;Michael Karcher<br>
<br>
</span></p>

</blockquote>

</div>

<p>&nbsp;</p>

</div></div></div>

</div>

</div>


</blockquote></div><br>