Search code examples
powershellrustwindows-11

rust "hello world" causes 'mouse option' window to open. Why?


I am on windows 11 I executed rustup-init.exe

Create a main.rs file with

fn main() {
    println!("Hello, world!");
}

I then executed rustc main.rs from Windows Power Shell to compile the program

Then, from Power Shell, i executed main

I got nothing at all on console. The prompt simply goes to new lines. Then without any apparent reason, the following setting window of windows 11 will popup.

enter image description here

enter image description here

What damn is happening ?!?!

This happens only from Power Shell

From cmd it works

enter image description here


Solution

  • As suggested from @JeroenMostert in the comment

    Executing from Power Shell the command main will execute automatically the .cpl.

    Indeed, executing main.exe will execute my executable.

    Damn.