-
I'm having an issue with building exe files and running them from within WSL. Here's a small example that works for me to reproduce the issue: # Setup a shell for cross-compiling to Windows
nix-shell -p pkgsCross.mingwW64.stdenv.cc
# Build a binary `hello.exe` that prints "1"
printf '#include <stdio.h>\nint main(){printf("1\\n");}' > hello.c
x86_64-w64-mingw32-cc -o hello.exe hello.c
./hello.exe # prints "1"
# Build a binary `hello.exe` that prints "2"
printf '#include <stdio.h>\nint main(){printf("2\\n");}' > hello.c
x86_64-w64-mingw32-cc -o hello.exe hello.c
./hello.exe # still prints "1"! cached?
# (in)sanity check
mv hello.exe hello2.exe
./hello2.exe # prints "2" now! I have tried flipping the It's worth mentioning that this only happens when launched from within the WSL disk (e.g. Anyone know what's up? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Turning off most switches in Windows Defender fixed it. |
Beta Was this translation helpful? Give feedback.
Turning off most switches in Windows Defender fixed it.