DirectX and Wine

Ove Kaaven ovehk at ping.uio.no
Thu Apr 26 16:25:16 CDT 2001


On Thu, 26 Apr 2001, François Gouget wrote:

> R Kadijk wrote:
> > 
> > I'm having problems compiling and linking a simple DirectX program with Wine.
> > The problem is: a global variable c_dfDIMouse should be declared in dinput.h
> > and defined in library dinput.
> > c_dfDIMouse really is declared in dinput.h, but it seems that c_dfDIMouse is
> > not declared in library dinput.
> > During linking I get the error: undefined reference to `c_dfDIMouse'.
> > Anyone got a clue?
> 
>    Well, there seems to be a couple of problems:
> 
>  * First the variable is not defined in the dinput library. So you will
> probably need to add something like this in one of the dinput files:
> 
> const DIDATAFORMAT c_dfDIMouse;
> 
>    But then it will need to be initialized somehow. How is one supposed
> to get/set its value in DirectX (I don't know DirectX)? Where does its
> value come from?

I thought I already said it... it isn't exported from dinput, it comes
from the static library that goes with it (which is more than just a mere
import library, it also contains pre-initialized convenience variables
such as these).

>  * then this variable should be declared in 'dlls/dinput/dinput.spec' so
> that Windows applications can use it.

No Windows applications use it, since the variable's contents is linked in
statically... which incidentally also makes the Winelib implementation
much easier to do than you propose.





More information about the wine-users mailing list