Stuck with winelib + DLL import

Martin Wilck Martin.Wilck at Fujitsu-Siemens.com
Tue Aug 5 11:35:38 CDT 2003


Hi,

after a good while I had some time to look at my winelib project again.
Last time I worked on it was last December, before the "import library"
concept was introduced.

I had to realize that winelib had changed so much that I couldn't make
my code compile anymore. I tried all day to figure it out for myself,
but it seems I'll need some guidance.

This is what I have (strongly simplified): a DLL written in C++ and an
App (also C++) importing that DLL. I want to compile both under winelib,
and link everything together to get a working app. I fail miserably in
setting this up with winemaker like I did it in the past.

This is what I understood so far:

- DLLs now need an associated ".def" file to be imported,
- winebuild generates ".def" from ".spec",
- winewrap/winegcc are the future way to go, but they don't support
  building DLLs yet.

My problem is that I don't have a "spec" file for my DLL except the
winemaker-generated one (which is just a zero-length dummy). I also have
no "def" file, and because the DLL is C++, I have no clue how to write a
spec or def file manually (name mangling). Actually, I'd rather avoid
writing that stuff by hand.

It would be fine to use static linking instead of a DLL (ie the
equivalent of linking statically with a .lib file), but I have no clue
how to do that either except to brutally link all object files together
into a single executable.

As long as no wrapper code is involved, it seems that I can avoid the
problem by simply linking with unix ld.so. But I recall that this is
utterly wrong.

In short, I am clueless. Any hints appreciated.

Martin

-- 
Martin Wilck                Phone: +49 5251 8 15113
Fujitsu Siemens Computers   Fax:   +49 5251 8 20409
Heinz-Nixdorf-Ring 1	    mailto:Martin.Wilck at Fujitsu-Siemens.com
D-33106 Paderborn           http://www.fujitsu-siemens.com/primergy








More information about the wine-devel mailing list