Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mingw-w64: invalid use of incomplete type error while compiling webrtc (tg_owt) #22451

Open
ognevny opened this issue Nov 8, 2024 · 0 comments

Comments

@ognevny
Copy link
Collaborator

ognevny commented Nov 8, 2024

currently build of tg_owt (which is based on webrtc) fails with

  In file included from D:/M/msys64/ucrt64/include/winbase.h:2864,
                   from D:/M/msys64/ucrt64/include/windows.h:70,
                   from D:/M/msys64/ucrt64/include/rpc.h:16,
                   from D:/M/msys64/ucrt64/include/wtypesbase.h:7,
                   from D:/M/msys64/ucrt64/include/shlobj.h:9,
                   from C:/_/B/src/tg_owt/src/modules/desktop_capture/win/window_capture_utils.h:14,
                   from C:/_/B/src/tg_owt/src/modules/desktop_capture/win/window_capture_utils.cc:11:
  C:/_/B/src/tg_owt/src/modules/desktop_capture/win/window_capture_utils.cc: In member function 'bool webrtc::WindowCaptureHelperWin::IsWindowOnCurrentDesktop(HWND)':
  C:/_/B/src/tg_owt/src/modules/desktop_capture/win/window_capture_utils.cc:425:43: error: invalid use of incomplete type 'Microsoft::WRL::ComPtr<IVirtualDesktopManager>::InterfaceType' {aka 'struct IVirtualDesktopManager'}
    425 |     if (SUCCEEDED(virtual_desktop_manager_->IsWindowOnCurrentVirtualDesktop(
        |                                           ^~
  In file included from D:/M/msys64/ucrt64/include/shlobj.h:124:
  D:/M/msys64/ucrt64/include/shobjidl.h:1567:19: note: forward declaration of 'Microsoft::WRL::ComPtr<IVirtualDesktopManager>::InterfaceType' {aka 'struct IVirtualDesktopManager'}
   1567 | typedef interface IVirtualDesktopManager IVirtualDesktopManager;
        |                   ^~~~~~~~~~~~~~~~~~~~~~
  In file included from C:/_/B/src/tg_owt/src/modules/desktop_capture/win/window_capture_utils.h:16:
  D:/M/msys64/ucrt64/include/wrl/client.h: In instantiation of 'void** IID_PPV_ARGS_Helper(Microsoft::WRL::Details::ComPtrRef<T>) [with T = Microsoft::WRL::ComPtr<IVirtualDesktopManager>]':
  C:/_/B/src/tg_owt/src/modules/desktop_capture/win/window_capture_utils.cc:316:9:   required from here
    318 |                                   IID_PPV_ARGS(&virtual_desktop_manager_)))) {
        |                                   ^~~~~~~~~~~~
  D:/M/msys64/ucrt64/include/wrl/client.h:271:19: error: invalid use of incomplete type 'Microsoft::WRL::ComPtr<IVirtualDesktopManager>::InterfaceType' {aka 'struct IVirtualDesktopManager'}
    271 |     static_assert(__is_base_of(IUnknown, typename T::InterfaceType), "Expected COM interface");
        |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  D:/M/msys64/ucrt64/include/shobjidl.h:1567:19: note: forward declaration of 'Microsoft::WRL::ComPtr<IVirtualDesktopManager>::InterfaceType' {aka 'struct IVirtualDesktopManager'}
   1567 | typedef interface IVirtualDesktopManager IVirtualDesktopManager;
        |                   ^~~~~~~~~~~~~~~~~~~~~~
  D:/M/msys64/ucrt64/include/wrl/client.h: In instantiation of 'long unsigned int Microsoft::WRL::ComPtr<T>::InternalRelease() [with T = IVirtualDesktopManager]':
  D:/M/msys64/ucrt64/include/wrl/client.h:104:17:   required from 'Microsoft::WRL::ComPtr<T>::~ComPtr() [with T = IVirtualDesktopManager]'
    104 |                 InternalRelease();
        |                 ^~~~~~~~~~~~~~~
  C:/_/B/src/tg_owt/src/modules/desktop_capture/win/window_capture_utils.cc:304:48:   required from here
    304 | WindowCaptureHelperWin::WindowCaptureHelperWin() {
        |                                                ^
  D:/M/msys64/ucrt64/include/wrl/client.h:263:29: error: invalid use of incomplete type 'Microsoft::WRL::ComPtr<IVirtualDesktopManager>::InterfaceType' {aka 'struct IVirtualDesktopManager'}
    263 |                 return tmp->Release();
        |                        ~~~~~^~~~~~~
  D:/M/msys64/ucrt64/include/shobjidl.h:1567:19: note: forward declaration of 'Microsoft::WRL::ComPtr<IVirtualDesktopManager>::InterfaceType' {aka 'struct IVirtualDesktopManager'}
   1567 | typedef interface IVirtualDesktopManager IVirtualDesktopManager;
        |                   ^~~~~~~~~~~~~~~~~~~~~~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant