Skip to content

Instantly share code, notes, and snippets.

@tuukkao
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tuukkao/6eff690c7f8e5655bcd5 to your computer and use it in GitHub Desktop.
Save tuukkao/6eff690c7f8e5655bcd5 to your computer and use it in GitHub Desktop.
A guide to compiling Qt apps on the command line in Windows

##Compile Qt apps in Windows on the command line

This guide has been tested only with version 4.9.1 of the MinGW toolchain. Adapt these instructions to your toolchain of choice.

  • Download the Qt community edition web installer. When choosing packages, select MinGW 4.9.1. Do this step even though you might already have a MinGW toolchain installed, as Qt seems to be picky about which compilers it works with.
  • Optional: Download and install MSYS, a minimal shell environment for Windows.
  • Add Qt tools and the toolchain binaries to your path. By default they are located in c:\qt\5.4\mingw491_32\bin and c:\qt\tools\mingw491_32\bin, respectively. These must be placed before any other mingw binaries to prevent possible version conflicts.

That's it. Note that in the MinGW toolchain the make command has been renamed to mingw32-make.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment