<div class="gmail_quote"><br>The compiler chokes on the C++ coding that you pointed out. I&#39;m not sure exactly how to handle it, maybe just convert it all to c syntax? For now I&#39;ll just commit out those lines and just work on trying to get something to compile.<br>

<br>Now are you saying the code should be,<br>retval, WINAPI wine_cudaGetDeviceCount( int* count ){<br>&nbsp;&nbsp;&nbsp; return cudaGetDeviceCount( count );<br>}<br><br>or should it be<br><br>retval, WINAPI wine_cudaGetDeviceCount( int* count )<br>

<br>or <br><br>retval = WINAPI wine_cudaGetDeviceCount( int* count ){<br>&nbsp;&nbsp;&nbsp; return cudaGetDeviceCount( retval );<br>}<br><br>I&#39;ve never used retval and going off of <a href="http://www.systhread.net/texts/200612retval.php" target="_blank">http://www.systhread.net/texts/200612retval.php</a> , it seems that retval is as simple as returning the value from a function, so I set the input to equal retval then I can return the function ( retval) and it will have all the values right? Maybe I am miss understanding it.<div>
<div></div><div class="Wj3C7c"><br>
<br><div class="gmail_quote">On Mon, Jul 7, 2008 at 12:26 PM, Stefan D�singer &lt;<a href="mailto:stefan@codeweavers.com" target="_blank">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);">Actually you want something like</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">retval WINAPI wine_cudaSomething(int a, int etc)</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">so instead of the void use the return value the function is
supposed to return</span></p>

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

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">WINAPI tells the compiler about the calling convention(ie, first
parameter on the stack, in ecx, or elsewhere, who takes care about cleaning up
the stack, etc). You&#39;ll have to check the calling convention Win32 cuda uses,
but most likely WINAPI is correct. You don&#39;t have to care about the Linux cuda calling
convention, since the compiler knows about that from the Linux cuda headers</span></p>

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

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">I am also not quite sure about some constructs, like</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">&quot;wine_cudaBindTexture( size_t* offset, const struct texture
&lt; T, dim, readMode &gt;&amp; texRef, const void* devPtr, const struct
cudaChannelFormatDesc&amp; desc, size_t size = UINT_MAX )&quot; As far as I
know this contains C++ or Microsoft syntax, which is not valid in pure C.</span></p>

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

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