Le lundi 24 octobre 2022 à 12:44:46 UTC+2, Matthias a écrit :
A preview for the Microsoft developer IDE "Visual Studio" has been released in late September that finally supports the ARM version of Windows 11. I am happy to announce that FLTK compiles and runs and can be debugged under VC on ARM.
For context, Windows 11 has been running on ARM CPUs for a while, and there are several machines out there with ARM CPUs. It can run Intel apps by emulating the CPU.
But native ARM apps are by a factor 4 or so faster than emulated Intel apps. Visual Studio though did *not* run on ARM, neither native nor emulated, so the only way to compile an ARM app on Windows so far was using Visual Studio on an Intel machine, cross compiling to ARM, and remotely debugging on an ARM machine.
The newest preview release finally changes that, runs native, and debugs native, and FLTK works just fine after some preliminary testing.
Yay!
I'd like to add it's possible to use msys2 and the mingw clang compiler under Windows 11 for ARM, as follows
- install MSYS2 (x86_64) from www.msys2.org
- install the native ARM mingw C/C++ compiler:
Add this in /etc/pacman.conf file :
[clangarm64]
Include = /etc/pacman.d/mirrorlist.mingw
Run these commands in the msys2 terminal :
pacman -Sy
pacman -S --needed mingw-w64-clang-aarch64-toolchain
pacman -S mingw-w64-clang-aarch64-glew
pacman -S git
pacman -S make
- In file /c/msys64/etc/profile, add /c/msys64/clangarm64/bin to MSYS2_PATH
- Add to the system environment variable PATH: C:\msys64\usr\bin\ and C:\msys64\clangarm64\bin
- logout / login
At that point, it's possible to build native Windows ARM FLTK apps using cmake-gui followed by make.
The first time cmake-gui is run, select "Msys makefiles" and these
custom compilers: C:/msys64/clangarm64/bin/gcc.exe and C:/msys64/clangarm64/bin/g++.exe