Skip to content

Build failure under MSYS2 MinGW32 #275

Description

@minnyres

I got the following error when building amule 2.3.3 with boost under MSYS2 MinGW32.
It seems that wxwidget needs to convert the second parameter from 'LPCTSTR' to 'LPCWSTR' when calling the function CreateDialogW(hInstance, pTemplate, hwndParent, pDlgProc), but the conversion is illegal. The error only occurs when boost is enabled.

In file included from C:/msys64/mingw32/i686-w64-mingw32/include/windows.h:72,
                 from C:/msys64/mingw32/i686-w64-mingw32/include/winsock2.h:23,
                 from C:/msys64/mingw32/include/boost/asio/detail/socket_types.hpp:33,
                 from C:/msys64/mingw32/include/boost/asio/detail/win_tss_ptr.hpp:23,
                 from C:/msys64/mingw32/include/boost/asio/detail/tss_ptr.hpp:25,
                 from C:/msys64/mingw32/include/boost/asio/detail/call_stack.hpp:20,
                 from C:/msys64/mingw32/include/boost/asio/detail/thread_context.hpp:20,
                 from C:/msys64/mingw32/include/boost/asio/detail/recycling_allocator.hpp:20,
                 from C:/msys64/mingw32/include/boost/asio/detail/handler_alloc_helpers.hpp:21,
                 from C:/msys64/mingw32/include/boost/asio/detail/executor_function.hpp:19,
                 from C:/msys64/mingw32/include/boost/asio/execution/any_executor.hpp:23,
                 from C:/msys64/mingw32/include/boost/asio/execution.hpp:19,
                 from C:/msys64/mingw32/include/boost/asio/system_executor.hpp:20,
                 from C:/msys64/mingw32/include/boost/asio/associated_executor.hpp:22,
                 from C:/msys64/mingw32/include/boost/asio.hpp:21,
                 from ../../src/LibSocketAsio.cpp:45,
                 from ../../src/LibSocket.cpp:29:
C:/msys64/mingw32/include/wx-3.0/wx/msw/winundef.h: In function 'HWND__* CreateDialog(HINSTANCE, LPCTSTR, HWND, DLGPROC)':
C:/msys64/mingw32/include/wx-3.0/wx/msw/winundef.h:38:45: error: cannot convert 'LPCTSTR' {aka 'const char*'} to 'LPCWSTR' {aka 'const wchar_t*'}
   38 |             return CreateDialogW(hInstance, pTemplate, hwndParent, pDlgProc);
      |                                             ^~~~~~~~~
      |                                             |
      |                                             LPCTSTR {aka const char*}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions