extern variable question

Francois Gouget fgouget at free.fr
Wed Sep 15 18:47:45 CDT 2004


On Tue, 14 Sep 2004, Robert Reif wrote:
[...]
> OK.  Here is the beginnings of a joystick test.  I want to use
> c_dfDIJoystick2 which is defined as extern in dinput.h and exists in
> dinput.dll.so but is not exported.  It's also not exported in windows
> dinput.dll but it is in dinput.lib.

Are you really sure it is not exported by dinput.dll? The usual tools
list all the exported *functions* but I'm not sure they list exported
variables. You seem to think that dinput.lib is a static library which
is very doubtful.


> How do I get the same behavior in wine?

Given the current Winelib capabilities you cannot.

Even if you were to make a dinput.a it would be useless. It would solve
the link error, but you would end up with two c_dfDIJoystick2 variables:
 * one stored in dinput.dll.so
 * one stored in your own application and coming from dinput.a

Your application would read/write the latter variable which would
obviously have no effect whatsoever on the variable stored in
dinput.dll.so.


-- 
Francois Gouget         fgouget at free.fr        http://fgouget.free.fr/
                         Stolen from an Internet user:
              "f u cn rd ths, u cn gt a gd jb n cmptr prgrmmng !"



More information about the wine-devel mailing list