building a winelib dll?

Seth Burleigh wburle4 at
Fri Nov 19 05:04:21 CST 2010

The purpose of this dll is to make a binding to zeromq. Ive tried compilin
natively using microsoft visual studio but it doesn't like the msvc90 dll
that i have and i dont want to have to worry about distribution issues of
that dll. Plus mingw is a pain to build with and often fails randomly. So i
thought this would be the best option. I know its simple to do, i just dont
know what im doing wrong...

On Thu, Nov 18, 2010 at 8:59 PM, Seth Burleigh <wburle4 at> wrote:

> Im trying to build a simple winelib. Its not working and is returning
> 'error 127'. I have some question:
> (1) how do i determine which functions are exported by wine? All i see
> using nm is the names of my proxy function (add_proxy) instead
> of the name that is going to be called by the windows program (add)
> (2) whats the point of a spec file? what im saying is that i can build my
> files without a spec file and no error message is produced. In what stage of
> building is the spec file actually used?
> (3) is there any way to debug just specifically the errors produced by my
> stub dll under wine? somehow specify a debug channel where the real reason
> for 'error 127' is? The stub dll being dynamically loaded by a program for
> which i have no source code.
> I am using these simple test files:
> //in zmq.c
> #include "zmq.h"
> #include "wine/debug.h"
> #include <windef.h>
> long WINAPI add_proxy(long a,long b) {
>     return a+b;
> }
> ;;in zmq.dll.spec
> @  stdcall add( long long ) add_proxy
> and then i do
> winegcc -c      -o zmq.o zmq.c
> winegcc -shared -o zmq.o
> However, i notice that i can just get rid of the spec file and no error
> messages are produced which makes no sense since the dll is supposed to
> redirect calls to add to add_proxy.
> And once i use the windows program to call function add, i get the 'error
> 127', which means it cant find the function 'add.'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the wine-devel mailing list