Seth,<br><br>Take a look at the source code to the CUDA 3.0 wrapper I 
just finished. You have some mistakes in your coding and this should 
help provide you a better example. When I first was coding the CUDA 2.0 
wrapper some people told me to look at opengl and how it was wrapper to 
the linux library so that is how I came up with this.<br>
<br><a target="_blank" href="http://shelnutt2.host56.com/wrapper.tar.gz">http://shelnutt2.host56.com/wrapper.tar.gz</a><br><br>Generally
 the specfile goes like<br><br>@  stdcall cudaGetDeviceProperties( ptr 
long ) wine_cudaGetDeviceProperties<br>
<br>Then in your .c file:<br><br>cudaError_t WINAPI 
wine_cudaGetDeviceProperties(<div class="ii gt" id=":41">struct cudaDeviceProp *prop, int 
device) {<br>    WINE_TRACE(&quot;\n&quot;);<br>    return 
cudaGetDeviceProperties(prop, device);<br>}<br><br>
<br>Also your linking looks off. You shouldn&#39;t be linking -l&quot;.&quot; . You 
need to specify the exact file, like for CUDA we did -lcudart or 
-lcufft.<br><br>I hope that help you some.<br><br>-Seth Shelnutt<br></div><br><br><div class="gmail_quote">On Wed, Jun 16, 2010 at 2:04 AM, Seth Burleigh <span dir="ltr">&lt;<a href="mailto:seth@tewebs.com">seth@tewebs.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Im attempting to build a dll which a windows program running under wine<br>
can dynamically load. The dll will be a wrapper around a linux library.<br>
In preparation ive tried to follow the instructions here<br>
<a href="http://www.winehq.org/docs/winelib-guide/bindlls" target="_blank">http://www.winehq.org/docs/winelib-guide/bindlls</a><br>
with a simple example but have not succeeded. Below is the contents of<br>
the files in my directory and the commands i executed. Can anyone help<br>
out? Thanks!<br>
<br>
<br>
<br>
MyLinuxFunc.c<br>
        int MyLinuxFunc(int a,int b) {<br>
                return a+b;<br>
        }<br>
-----------------------------<br>
MyLinuxFunc.h<br>
        int MyLinuxFunc(int,int);<br>
-----------------------------<br>
libMyLinuxFunc.so<br>
-----------------------------<br>
MyWin.dll.spec<br>
    2 stdcall MyWinFunc (long long) MyProxyWinFunc<br>
-----------------------------<br>
MyWin.c<br>
<br>
        #include &lt;MyLinuxFunc.h&gt;<br>
        #include &lt;windef.h&gt;<br>
        int WINAPI MyProxyWinFunc (int a,int b)<br>
        {<br>
         return MyLinuxFunc(a,b);<br>
        }<br>
-----------------------------<br>
<br>
<br>
winemaker . --nosource-fix --dll --single-target MyWin --nomfc -I&quot;.&quot;<br>
-L&quot;.&quot; -iMyLinuxFunc<br>
<br>
make<br>
winegcc  -o MyWin.so MyLinuxFunc.o MyWin.o    -L.   -lMyLinuxFunc<br>
MyWin.o: In function `MyProxyWinFunc&#39;:<br>
MyWin.c:(.text+0x20): undefined reference to `MyLinuxFunc&#39;<br>
/usr/lib/wine/libwinecrt0.a(exe_main.o): In function `main&#39;:<br>
(.text+0xa0): undefined reference to `WinMain&#39;<br>
collect2: ld returned 1 exit status<br>
winegcc: i486-linux-gnu-gcc failed<br>
make: *** [MyWin.so] Error 2<br>
<br>
<br>
<br>
<br>
</blockquote></div><br>