Build Windows

Russ Gibson edited this page Jun 6, 2016 · 14 revisions

Build Instructions

Currently Qucs is built under Windows using the MSYS2 environment and the MinGW compiler. (The old build instructions can be found below)

Download MSYS2

  • install it in C:\msys64, the default proposed installation directory, and run the shell, as proposed at the end of the installation. The shell can also be started manually, by running C:\msys64\mingw64_shell.bat

Install the needed packages

The following commands will be typed in the MSYS2 shell environment.

  • set the path using export PATH=/usr/local/bin:/usr/bin:/bin to be sure to use the MSYS2 tools in case you previously had installed MSYS1

  • update the package manager mirrors, pacman --noconfirm --sync pacman-mirrors

  • install the compiler, pacman -S base-devel mingw-w64-x86_64-toolchain

  • exit and relaunch the mingw64_shell.bat

  • install these other packages

    • pacman --noconfirm -S autoconf automake bison flex wget (takes some time)
    • pacman --noconfirm -S mingw-w64-x86_64-qt4 (takes even more time...)

Donwload and compile admsXml

tar -xf adms-2.3.4.tar.gz
cd adms-2.3.4
./configure && make install
cd ..

Get the Qucs source code

Clone the Git repository

git clone

Build the Qucs GUI application

cd qucs 
QTDIR=/c/msys64/mingw64/ ./configure
make install
cd ..

Qucs will be installed in /usr/local/bin

run qucs -v to check it's working correctly

Build Qucs-core

cd qucs-core 
./configure --disable-dependency-tracking --with-mkadms=`which admsXml`
 make install
cd ..

the Qucs simulator will be installed in /usr/local/bin

run qucsator -v to check it's working correctly

OLD Build Instructions - Windows 8.1 - MinGW 4.8.2 - Qt 4.8.6

This page contains instructions on how to build and install with the Autotools and CMake build systems. The install path can be any of your choice, here we use C:\qucs-auto\ and C:\qucs-cmake to make a distinction.

Tested with Windows 8.1 Enterprise 90-day evaluation version, installed on a Virtual box instance.


MinGW compiler

  • Use the same version used to compile the Qt libraries.

  • Compiler of choice (for Qt 4.8.6) i686-4.8.2-release-posix-dwarf-rt_v3-rev3.7z

  • Get a tool to extract the compressed file, 7-Zip for instance.

  • Extract it to C:\

  • Add C:\mingw32\bin to the Windows PATH environment variable


  • We will be using a snapshot release of Qt 4.8.6. This version is compiled against the above MinGW 4.8.2.

  • Download the latest snapshot/or stable release if available [] - 326MB

  • Execute the installer

  • When asked, point the Qt installer to the location of MinGW in C:\mingw32

  • Add it to path

  • Make sure C:\Qt\4.8.6\bin is on the PATH


  • Git for Windows. Only in case you want to clone the repository.

  • Note that Git on Windows provides also flex, bison. In case you want to use these tools you to have add C:\Program Files (x86)\Git\bin to the Windows PATH.

Get pre-compiled gperf and admsXml

Get the Qucs source code

Either (1) clone the Git repository or (2) download a repository snapshot.

Clone repository

  cd \
  mkdir git; cd git
  git clone git:// qucs

Repository snapshot

Build with Autotools / MSYS

Install MSYS terminal and further development tools

  • Download and run mingw-get installer

  • Select mingw-developer-tool, apply changes to install

  • When asked point to the installation to C:\mingw32

  • Make sure C:\mingw32\bin is on the Windows PATH

  • You might need to include C:\mingw32\msys\1.0\bin to path (for flex, bison)

  • Copy gperf.exe, admsXml.exe into C:\mingw\bin

  • Launch C:\mingw32\msys\1.0\msys.bat

  • run mount -r C:/mingw32 /mingw (you might need to use the long format options style mount --replace C:/mingw32 /mingw)

Build Qucs GUI (and tools)

  export QTDIR=/c/Qt/4.8.6/
  cd /c/git/qucs/qucs
  ./configure --enable-maintainer-mode --prefix=/c/qucs-auto/
  make install

Build Qucs Core

  cd /c/git/qucs/qucs-core
  ./configure --enable-maintainer-mode --with-mkadms=/mingw/bin/admsXml.exe --prefix=/c/qucs-auto/
  make install

After install, remember to copy amdsXml.exe also into C:\qucs-auto\bin so it can be used by Qucs.


From the MSYS terminal

  export QUCSDIR=c:\qucs-auto
  • To launch from Windows Explorer it will be necessary to add a Windows environment variable QUCSDIR=c:\qucs-auto.

Build with Cmake / cmd terminal

Build Qucs GUI (and tools)

Open a cmd window

  cd C:\git\qucs\qucs
  mkdir build
  cd build
  cmake .. -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=C:\qucs-cmake
  make install

Build Qucs Core

  cd C:\git\qucs\qucs-core
  mkdir build
  cd build
  cmake .. -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=C:\qucs-cmake
  make install
  • In case admsXml.exe is not found, let CMake know about its location with -DADMSXML_DIR=C:\MinGW\bin

  • After install, remember to copy amdsXml.exe also into C:\qucs-cmake\bin so it can be used by Qucs.


From the cmd terminal

  set QUCSDIR=c:\qucs-cmake
  • To lauch from Windows Explorer it will be necessary to add a Windows environemnt variable QUCSDIR=c:\qucs-cmake.


The debug messages on Windows are normally sent to the debugger, not the console. Qucs has a redirection routine to handle the situation (see qucs/main.cpp method qucsMessageOutput).

The user has to install the DebugView tool to intercept the debug messages from Qucs. Open DebugView before running Qucs. It should capture the debug messages that are normally printed to the console on Linux/OSX.

Final notes

  • Note that the CMakeLists.txt files can be used as projects on the QtCreator IDE. It makes it easier for new contributors.