kozec / dumbxinputemu

xinput reimplementation compatibile with DirectInput controllers
GNU Lesser General Public License v3.0
133 stars 12 forks source link

Cannot compile on Debian Jessie #3

Closed seemoss closed 7 years ago

seemoss commented 7 years ago

Hi,

I cannot compile dumbxinputemu 0.3.1 on Debian Jessie due to an unknown type (see below, same for 64-bit). I must be missing some dev library/include package but can't tell which one.

Regards,

Simos


$ make
/usr/bin/i686-w64-mingw32-gcc  -I/usr/i686-w64-mingw32/include -Idumbxinputemu -L{USR}/i686-w64-mingw32/lib/ -c dumbxinputemu/dinput_input.c -o dumbxinputemu/dinput_input.32.o
/usr/bin/i686-w64-mingw32-gcc  -I/usr/i686-w64-mingw32/include -Idumbxinputemu -L{USR}/i686-w64-mingw32/lib/ -c xinput1_3/xinput1_3.c -o xinput1_3/xinput1_3.32.o
xinput1_3/xinput1_3.c:51:5: error: unknown type name ‘_Inout_’
     _Inout_  XINPUT_VIBRATION *pVibration
     ^
Makefile:28: recipe for target 'xinput1_3/xinput1_3.32.o' failed
make: *** [xinput1_3/xinput1_3.32.o] Error 1
kozec commented 7 years ago

I'm not sure why should that one be undefined, but can you check output of /usr/bin/i686-w64-mingw32-gcc --version ?

// edit: Assuming that you have older version of gcc and mine includes sal annotations by default, compiling from this branch may work for you.

seemoss commented 7 years ago

Thanks for the quick response. Here's what I have:

$ /usr/bin/i686-w64-mingw32-gcc --version i686-w64-mingw32-gcc (GCC) 4.9.1

The dumbxinputemu-sal-includes branch gives the same error.

I'll be upgrading soon to Debian Stretch which was released a couple of months ago and seems to include mingw-w64 version 6.3.0 so don't waste any more time on this until I upgrade & test.

kozec commented 7 years ago

i686-w64-mingw32-gcc (GCC) 4.9.1

Woa. I believe that current version of gcc is 7.1.1.

I'd suggest you to use precompiled dlls from Releases section in this specific case.

C0rn3j commented 7 years ago

✘ c0rn3j@c0rn3jDesktop  ~  /usr/bin/i686-w64-mingw32-gcc --version i686-w64-mingw32-gcc (GCC) 7.1.1 20170516

Yup.

If this is the actual project, then that type name was added 2015-07-06, and if the version numbers follow gcc - which they seem to -, then I guess the lowest GCC version to compile this project would be GCC 5.2 (July 16, 2015) or possibly a bit higher.

So on my Arch system I did..

sudo pacman -U https://archive.archlinux.org/packages/m/mingw-w64-gcc/mingw-w64-gcc-5.2.0-3-x86_64.pkg.tar.xz

Which installed the version 5.2.0 and I could build the project fine (didn't test the DLLs with a game though).

Tried again with 5.1.0 and 4.9.2, AND 4.9.1 which OP used, and all worked(??).

Is there some other library being used?

c0rn3j@c0rn3jDesktop  ~/dumbxinputemu   master  /usr/bin/i686-w64-mingw32-gcc --version
i686-w64-mingw32-gcc (GCC) 4.9.1
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
kozec commented 7 years ago

Is there some other library being used?

None I know about. Or rather, if I'm not mistaken, SAL annotations are part of standard library on Windows.