Fwd: "Out of Tree" DLLs

Maarten Lankhorst m.b.lankhorst at gmail.com
Sat Mar 24 10:03:19 CDT 2007


Kai Blin schreef:
> Hi folks,
>
> Tim asked me about this on IRC today, and I didn't have any good idea about 
> it, so I'll just forward it to you people.
>
> Cheers,
> Kai
>   
>
> ------------------------------------------------------------------------
>
> Onderwerp:
> "Out of Tree" DLLs
> Van:
> Tim Ansell <mithro at mithis.com>
> Datum:
> Sun, 25 Mar 2007 00:22:52 +1030
> Aan:
> kai.blin at gmail.com
>
> Aan:
> kai.blin at gmail.com
>
> Return-Path:
> <mithro at mithis.com>
> X-Original-To:
> nowhere at localhost
> Delivered-To:
> nowhere at localhost.home.nowhere-productions.org
> Received:
> from blackjack.home.nowhere-productions.org (localhost [127.0.0.1]) by
> blackjack.home.nowhere-productions.org (Postfix) with ESMTP id
> E49822037F for <nowhere at localhost>; Sat, 24 Mar 2007 14:55:29 +0100 (CET)
> Delivered-To:
> kai.blin at gmail.com
> Received:
> from pop.gmail.com by blackjack.home.nowhere-productions.org with POP3
> (fetchmail-6.3.2) for <nowhere at localhost> (single-drop); Sat, 24 Mar
> 2007 14:55:29 +0100 (CET)
> Received:
> by 10.114.75.8 with SMTP id x8cs1391094waa; Sat, 24 Mar 2007 06:53:20
> -0700 (PDT)
> Received:
> by 10.66.243.2 with SMTP id q2mr8592169ugh.1174744400071; Sat, 24 Mar
> 2007 06:53:20 -0700 (PDT)
> Received:
> from lester.mithis.com (lester.mithis.com [69.60.120.93]) by
> mx.google.com with ESMTP id b30si12976425ika.2007.03.24.06.53.15; Sat,
> 24 Mar 2007 06:53:20 -0700 (PDT)
> Received-SPF:
> pass (google.com: domain of mithro at mithis.com designates 69.60.120.93
> as permitted sender)
> Received:
> from [10.1.50.1] (ppp246-117.static.internode.on.net
> [203.122.246.117]) by lester.mithis.com (Postfix) with ESMTP id
> F1052B777 for <kai.blin at gmail.com>; Sat, 24 Mar 2007 09:53:02 -0400 (EDT)
> Content-Type:
> text/plain
> Organisatie:
> MITHIS
> Bericht-ID:
> <1174744373.26118.50.camel at localhost>
> MIME-versie:
> 1.0
> X-Mailer:
> Evolution 2.10.0
> Content-Transfer-Encoding:
> 7bit
> Regels:
> 23
>
>
> Hi,
>
> A long while back I wrote a "dll" which allows programs which use the
> ftd2xx.dll library to access hardware to do so under wine. There has
> been some interest in getting it working again.
>
> There are a bunch of stuff which need this, however it's very niche so
> the code is always going to be fairly crappy and not good enough for the
> main wine tree.
>
> It would be nice if there was a way for you to build this DLL easily
> without having to build the complete wine.
>
> You can find the code here,
> http://ftd2xx.cvs.sourceforge.net/ftd2xx/ftd2xx/
>
> It probably doesn't compile at the moment as it's suffered quite a bit
> of "bit rot" over the few years that I haven't touched it.
>
> Thanks for your help.
>
> Tim Ansell
>   
After trying a little I came to the following conclusion, assuming dll
is called foo.dll, exports are available as foo.spec and wine is
installed globally:

winegcc -D_REENTRANT -D__WINESRC__ $(CFLAGS) -o foo_main.o foo_main.c
winegcc $(CFLAGS) -mwindows -lntdll -lkernel32 -o foo.dll foo_main.o
-shared foo.spec
winebuild -w --def -o libfoo.def --export foo.spec

After that you just need to put libfoo.def and foo.dll.so in the right
place.

Hope this helps,

Maarten



More information about the wine-devel mailing list