dll initialization

Suhaib Siddiqi ssiddiqi@inspirepharm.com
Thu May 11 03:51:00 GMT 2000


>
> After struggling with trying to make a dynamic version
> of the higher level X libraries, such as Xt.  It seems
> that I need to know something about dll initialization
> in the context of what is going on with X.



You SIMPLY cannot DO THIS. Period.  Unless you got plenty of
time on your hand to invent something new and reinvent
the wheels.

Did you read FAQ?  Here is a cut and paste for you.

3.12 Will there be Xaw.DLL, Xt.DLL and Xmu.DLL?


 No. GCC is free software, and most stuff written for it is
also freely available. Recompile if you want.However, keep the following in
mind:

"One of the biggest issues with X on Win32 is the moronic DLL format.
Specifically - it is not possible to export data from a Win32 DLL in a
form that can be used to statically initialize another global variable.
Data access from a DLL requires at least one pointer


indirection, and hence executable code. This is why X11R6 doesn't
have DLLs for Xt/Xmu/Xaw (and Motif) on Win32", quoted from
XFree86-developers Mailing List - David E. Wexelblat
(dwex@datafocus.com) Wed, 25 Mar 1998 10:08:27 -0500.


Suhaib



>
> Basic DLL's that I built have have been able to make
> use of global data with the decoration of __declspec's
> as appropriate.  But that does not seem to be enough
> for the higher level X stuff.  There appears to be a
> need for additional, manual, initialization.  (Is this
> a multithread issue?)
>
> Could someone point me somewhere so that I could learn
> what is going on.  I suppose that some discussion
> would be useful concerning how the higher level X
> libraries are 'different' from the (perhaps simple)
> DLL's that I've been coding myself.
>
> I'll certainly believe the maxim that global data is
> evil!  But it is not just global data, this is a
> global pointer issue I'm sure.  Perhaps something as
> simple as an allocation in an initialization step is
> all that is required.  At any rate I'm convinced that
> there is a general purpose programming lesson for me
> here.
>
> Thanks for the help.
>
> =====
> -- Craig Stevenson
> -- Home Page: http://www.sdc.org/~craigs/
> -- Recently computed: The 200 billionth digit of pi is 2.
>
> __________________________________________________
> Do You Yahoo!?
> Send instant messages & get email alerts with Yahoo! Messenger.
> http://im.yahoo.com/



More information about the Cygwin-xfree mailing list