psycha0s / airwave

Airwave is a WINE-based VST bridge, that allows for the use of Windows 32- and 64-bit VST 2.4 audio plugins with Linux VST hosts
MIT License
572 stars 35 forks source link

Does not build #104

Open pieceofduke opened 4 years ago

pieceofduke commented 4 years ago

While building locally or through aur-helper:

[ 28%] Building CXX object src/host/CMakeFiles/airwave-host-64.dir/host.cpp.o
In file included from /usr/include/wine/windows/objbase.h:258,
                 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 /home/duke/.build/airwave/src/host/host.h:7,
                 from /home/duke/.build/airwave/src/host/host.cpp:1:
/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 {
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/duke/.build/airwave/src/host/host.cpp: In member function ‘bool Airwave::Host::initialize(const char*, int)’:
/home/duke/.build/airwave/src/host/host.cpp:63:44: warning: cast between incompatible function types from ‘FARPROC’ {aka ‘long int (__attribute__((ms_abi)) *)()’} to ‘Airwave::VstPluginMainProc’ {aka ‘AEffect* (__attribute__((ms_abi)) *)(long int (__attribute__((ms_abi)) *)(AEffect*, int, int, long int, void*, float))’} [-Wcast-function-type]
   63 |    GetProcAddress(module_, "VSTPluginMain"));
      |                                            ^
/home/duke/.build/airwave/src/host/host.cpp:67:36: warning: cast between incompatible function types from ‘FARPROC’ {aka ‘long int (__attribute__((ms_abi)) *)()’} to ‘Airwave::VstPluginMainProc’ {aka ‘AEffect* (__attribute__((ms_abi)) *)(long int (__attribute__((ms_abi)) *)(AEffect*, int, int, long int, void*, float))’} [-Wcast-function-type]
   67 |     GetProcAddress(module_, "main"));
      |                                    ^
winegcc: g++ failed
make[2]: *** [src/host/CMakeFiles/airwave-host-64.dir/build.make:128: src/host/CMakeFiles/airwave-host-64.dir/host.cpp.o] Error 2
make[1]: *** [CMakeFiles/Makefile2:148: src/host/CMakeFiles/airwave-host-64.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
ekollof commented 4 years ago

Put -D__WIDL_objidl_generated_name_0000000C= in the CXXFLAGS and it should build

ekollof commented 4 years ago

Pull request here: https://github.com/psycha0s/airwave/pull/105