koku-xinput-wine icon indicating copy to clipboard operation
koku-xinput-wine copied to clipboard

Unable to compile

Open shikaan opened this issue 6 years ago • 7 comments

Hello! I am hoping to be able to play with my PS3 controller, so I'm giving this libraries a try.

I can smoothly run cmake . (even though skipping tests), but it seems like it was something wrong with the source while running make. Most probably it depends on the version of the compiler I have on my machine, but just in case here's the error trace:

manuel@manuel:~/koku-xinput-wine$ make
[ 12%] Building CXX object CMakeFiles/koku-xinput-wine64.dir/xinput.cpp.o
/home/manuel/koku-xinput-wine/xinput.cpp:319:23: error: ‘XInputGetStateEx’ was not declared in this scope
 koku::jumper<decltype(XInputGetStateEx)> XInputGetStateExJumper;
                       ^~~~~~~~~~~~~~~~
/home/manuel/koku-xinput-wine/xinput.cpp:319:23: error: ‘XInputGetStateEx’ was not declared in this scope
/home/manuel/koku-xinput-wine/xinput.cpp:319:40: error: template argument 1 is invalid
 koku::jumper<decltype(XInputGetStateEx)> XInputGetStateExJumper;
                                        ^
/home/manuel/koku-xinput-wine/xinput.cpp:320:50: error: ‘XINPUT_STATE_EX’ has not been declared
 DWORD WINAPI XInputGetStateEx(DWORD dwUserIndex, XINPUT_STATE_EX *pState) {
                                                  ^~~~~~~~~~~~~~~
/home/manuel/koku-xinput-wine/xinput.cpp: In function ‘void koku::XInputInit(void*)’:
/home/manuel/koku-xinput-wine/xinput.cpp:382:59: error: cannot convert ‘koku::jumper<unsigned int(unsigned int, int*)>’ to ‘int’ in assignment
         koku::make_jumper(address, &koku::XInputGetStateEx);
                                                           ^
CMakeFiles/koku-xinput-wine64.dir/build.make:86: recipe for target 'CMakeFiles/koku-xinput-wine64.dir/xinput.cpp.o' failed
make[2]: *** [CMakeFiles/koku-xinput-wine64.dir/xinput.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/koku-xinput-wine64.dir/all' failed
make[1]: *** [CMakeFiles/koku-xinput-wine64.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Specs:

gcc version 6.3.0 20170516 (Debian 6.3.0-18) 

image

Could you help me?

shikaan avatar Dec 16 '17 09:12 shikaan

I hit this too. It seems Wine 3.0 was the last release koku-xinput-wine was compatible with. I even tested building against wine-staging-2.21 (which succeeded) and running the resulting library against Wine 3.2. I got the two rumbles from the controller during the game load, but unsurprisingly the remapping no longer worked.

As I understand it, Wine will be upstreaming xinput support over the course of the next month or so. Since this work has already started, it almost certainly explains why this project is no longer building. In the meantime we'll just have to be patient and stick to Wine 3.0 or Wine Staging 2.21.

boltronics avatar Feb 17 '18 13:02 boltronics

How do we compile against different versions? I have the files on my computer, thanks to PlayOnLinux, but I don't know how to point the compiler to them.

MageJohn avatar Apr 06 '18 11:04 MageJohn

Shouldn't be needed anymore. Wine works natively with my controllers now in XInput games without any third party addons.

Enverex avatar Apr 06 '18 11:04 Enverex

Okay, thanks. My gamepad isn't currently working on (Wine 3.5), but at least I know that the solution isn't here, then.

MageJohn avatar Apr 06 '18 13:04 MageJohn

I recommend using xboxdrv if you're getting grief, it should make your gamepad(s) work with Wine and any Linux games without any configuration at all (it basically remaps it to be an XBox 360 controller which is what everything uses as the default setup these days).

Enverex avatar Apr 06 '18 13:04 Enverex

Okay, thanks! I'll look into that.

MageJohn avatar Apr 06 '18 14:04 MageJohn

I still have no luck with Sonic All Stars Racing Transformed, even with xboxdrv.

chewi avatar Apr 07 '18 08:04 chewi