Skip to content
This repository has been archived by the owner on Apr 25, 2020. It is now read-only.

error while compiling. #37

Open
Leibeun opened this issue Oct 20, 2019 · 1 comment
Open

error while compiling. #37

Leibeun opened this issue Oct 20, 2019 · 1 comment

Comments

@Leibeun
Copy link

Leibeun commented Oct 20, 2019

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
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants