Are you missing the first part of the error message?
It almost sounds like you're trying to run a 64-bit executable on a 32-bit machine. Googling that error message also shows several results for checking what machine your computer is running on, including this one which contains the exact error text and points the user to a 32-bit installer.
Maybe you need to compile to a 32-bit target like i686-pc-windows-msvc?
yes I do them and I choose my target, but it doesn't work in another pc for example
rustup set default-host i686-pc-windows-msvc
rustup toolchain install stable-gnu
it's just a simple code but nothing
Of course my 64 bit windows machine where I am compiling the project works fine but of course I try another 32 bit windows machine and 64 bit windows 10 and 64 bit windows 7, it doesn't work, the error comes back.
The error popup says that you can't run 64bit executable on 32bit OS(assuming Google translate is correct). Note that you can install 32bit Windows on 64bit machine, which cannot execute 64bit program.
If you've installed the Rust toolchain with the rustup, try this command to build 32bit executable.
You will need to install the right version of the Visual C++ Redistributable on the target pc. Installers for programs generally do this automatically for you. You can find them at Latest supported Visual C++ Redistributable downloads | Microsoft Docs To be precise I believe you need the one under the " Visual Studio 2015, 2017, 2019, and 2022" section.
But the problem is not on my computer. I have all distributions installed. I'm talking on another computer. We assume that I created a program and someone else is using it on another computer. I mean, every time I have to install these distros, it's tiring. I want is there a solution to build a program that can be used on all windows 32bit 64bit devices