KoKuToru / koku-xinput-wine

Adds xinput support to wine, without changing the source of wine.
BSD 2-Clause "Simplified" License
69 stars 21 forks source link

error while compiling. #37

Open Leibeun opened 4 years ago

Leibeun commented 4 years ago

i have all dependencies installed. trying to compile on arch linux. Terminal output:

[zana@archlinux koku-xinput-wine]$ make
[ 12%] Building CXX object CMakeFiles/koku-xinput-wine.dir/device.cpp.o
In file included from /usr/include/wine/windows/objbase.h:252,
                 from /usr/include/wine/windows/ole2.h:25,
                 from /usr/include/wine/windows/wtypes.h:13,
                 from /usr/include/wine/windows/winscard.h:22,
                 from /usr/include/wine/windows/windows.h:70,
                 from /usr/include/wine/windows/rpc.h:22,
                 from /usr/include/wine/windows/objbase.h:19,
                 from /home/zana/koku-xinput-wine/device.cpp:7:
/usr/include/wine/windows/objidl.h:6100:15: error: ‘union _userSTGMEDIUM::<unnamed struct>::__WIDL_objidl_generated_name_0000000C’ invalid; an anonymous struct may only have public non-static data members [-fpermissive]
 6100 |         union __WIDL_objidl_generated_name_0000000C {
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/koku-xinput-wine.dir/build.make:89: CMakeFiles/koku-xinput-wine.dir/device.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:77: CMakeFiles/koku-xinput-wine.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
[zana@archlinux koku-xinput-wine]$ 
trindadegm commented 4 years ago

Found the same problem. It can be fixed by adding the option -fpermissive on the KOKU_COMPILE_OPTIONS, line 47 of the CMakeLists.txt file.

From the docs

-fpermissive Downgrade some diagnostics about nonconformant code from errors to warnings. Thus, using -fpermissive allows some nonconforming code to compile.

The compiler still warns:

note: this flexibility is deprecated and will be removed

So the problem will eventually need to be solved.