winegcc and dlls

Dimitrie O. Paun dpaun at rogers.com
Wed Jul 16 00:27:34 CDT 2003


On July 15, 2003 09:23 pm, Jonathan Wilson wrote:
> 1.is anyone working on making winegcc do dlls?

I was supposed to, but I've been away for over a month,
and it takes time to get back into a working mode ... :)

> 2.what is the "hard part" about making winegcc do dlls?

It's not rocket science, it's just that we should try (hard)
to make winegcc behave (as much as possible) as mingw-gcc.

> and 3.is there something I can do (code-hacking wise) to help 
> with winegcc dll support?

Help would be appreciated, as it seems this little thing holds
up a lot of other stuff.

What we need to do is support -shared. The dllwrap/dlltool stuff
from binutil has been deprecated for the more standard -shared
flag to gcc.

So, what we need is:
    -- recognize the -shared flag in winegcc, and forward to 
       winewrap (easy)
    -- instrument winewrap to do the winebuild invokation
       and all the other crap that is done in the Makefiles
       (not hard, we just need to study the Makefiles for the
        proper way to build a DLL in Wine).

Ideally, we should end up with the same way of building a DLL
in Wine as in Mingw. Unfortunately, I don't think that's feasible
100% now. The problem is that mingw-gcc supports __declspec(dllexport)
and __declspec(dllimport) which allows it to build the DLL without
a .def file. The Unix gcc does not support these, so we will need
a .def file for the time being. Not a big problem for now, we can
worry about it later.

-- 
Dimi.




More information about the wine-devel mailing list