Compiling Wget for Windows Using MinGW and MSYS

September 8, 2008

Relevant Links

GNU Wget page

MinGW SourceForge page

UNIX / Linux Tutorial for Beginners

Down the Port

Download the Current Release of the Wget port, version 1.9.1 as of this post, from the link below:

Create the directory C:\MSYS\1.0\src and save the downloaded file to that path.

Note: If your MSYS is not installed on the standard path of C:\MSYS then you’ll have to adjust the paths to match your installation.


Start MSYS and then change to the /usr/src directory:

cd /usr/src

Extract the port, then change to the wget-1.9.1/mingwport directory:

tar xvjf wget-1.9.1-mingwPORT.tar.bz2
cd wget-1.9.1/mingwport

Copy the wget.exe file to the /tmp directory:

cp -p wget.exe /tmp/

Note: The port is a shell script that will download, configure, and make the Wget source automatically, after we answer a few prompts.

Compiling Wget

Execute the port script:


We will accept the default response to every prompt. Press the enter key in response to the prompt to accept the default.

After pressing enter at the CFLAGS prompt the interactive stage ends and the script goes into fully automated operation.

Note: You may need to unblock wget if the Windows Firewall asks, although I didn’t.

Note: During the build process a great deal of text is output to the MSYS console, which you may need to refer back to if any errors occur.

Last Steps

Now install the Info pages for Wget:

install-info dir

You’re done.


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: