Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Tracking issue: Shift to using UCRT64 env for prebuilt windows-gnu binaries #1493

@MoAlyousef

Description

@MoAlyousef

According to the msys2 project, they have changed the default environment from MINGW64 to UCRT64.
https://www.msys2.org/news/#2022-10-29-changing-the-default-environment-from-mingw64-to-ucrt64

This uses the universal c runtime instead of linking the old msvc runtime.

Advantages of this are:

  • Better compat with the msvc toolchain, both at build time and at run time.
  • Supports UTF8 by default.
  • Has better support for newer C standards, which cfltk depends on.
  • The mingw builds will also default to ucrt in future versions, this will make using the fltk-bundled feature for cross compiling to windows break unless built against ucrt.

Disadvantages are that:

  • The ucrt is only available on Windows 10 and later.
  • Build failure if you link a ucrt-built cfltk in a MINGW64 runtime.
  • Unless all distros provided a ucrt by default mingw toolchain, there might be breakages on distros which still use msvcrt when cross-compiling to windows while using the fltk-bundled flag.

Windows does provide a way to install the ucrt on older windows versions, all the way to vista:
https://support.microsoft.com/en-us/topic/update-for-universal-c-runtime-in-windows-c0514201-7fe6-95a3-b0a5-287930f3560c

Blocking issues:

It seems the rust-mingw component of the rust toolchain is unable to link the ucrt. This is relevant if you're building outside of msys2/ucrt64 environment.

Regardless of this change, building from source should work correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions