How can I run a Unix Shell script Under Windows?

As the title, I have the source code of GCC, and I am going to build GCC using it. However, as everyone knows, script configure is a Unix Shell script, so I cannot run it under Windows.

Therefore, how can I run a Unix Shell script Under Windows to build GCC?
You could install cygwin to give a Linux-like environment on Windows:
https://www.cygwin.com/
Cygwin or MSYS2 (Mingw-w64) give you a fully-fledged "Unix-like" environment on Windows:
https://www.msys2.org/

Note: Programs compiled with Cygwin will always depend on the Cygwin-DLL (i.e. Cygwin compatibility layer) at runtime! Meanwhile, MSYS2 (Mingw-w64) produces "native" Windows executables.


If you just need a Unix shell (and maybe some other basic Unix utilities), then give BusyBox a try:
https://frippery.org/busybox/

(BusyBox is a single binary that contains many common Unix tools)
Last edited on
Open Command Prompt and navigate to the folder where the script file is available. Type Bash script-filename.sh and hit the enter key. It will execute the script, and depending on the file, you should see an output.
https://www.landstaronline.org/
Last edited on
How long before Eathan turns his vague post into one to show a spam link? He's done it before.

https://cplusplus.com/forum/beginner/284513/#msg1232292
Are you building that package to run as a native Windows app, or via cygwin (or similar)?

It's hard to give helpful answer from what you've specified.
Topic archived. No new replies allowed.