<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@MS Mincho";}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.E-MailFormatvorlage17
        {mso-style-type:personal-reply;
        font-family:"Calibri","serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","serif";
color:#1F497D'>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'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't apply then as well.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'>

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>

<p class=MsoNormal><b><span lang=DE style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
lang=DE style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
wine-devel-bounces@winehq.org [mailto:wine-devel-bounces@winehq.org] <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> wine-devel@winehq.org<br>
<b>Subject:</b> Re: CUDA wrapper<o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal style='margin-bottom:12.0pt'>I writing a wrapper, would it
be correct to more or less follow this guide, on winelib dll's? <a
href="http://www.winehq.org/site/docs/winelib-guide/bindlls">http://www.winehq.org/site/docs/winelib-guide/bindlls</a><br>
<br>
I'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'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>
<o:p></o:p></p>

<div>

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

<p class=MsoNormal>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.<o:p></o:p></p>

<div>

<p class=MsoNormal>&nbsp;<o:p></o:p></p>

</div>

<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;
margin-left:4.8pt;margin-right:0in'>

<div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

<p class=MsoNormal style='margin-bottom:12.0pt'>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:#888888'>&nbsp;Michael Karcher<br>
<br>
</span><o:p></o:p></p>

</blockquote>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

</div>

</body>

</html>