Compiling qucs on windows (mingw32 native) - guitorri/qucs GitHub Wiki

Build instructions for Win32

MinGW32 natively

In this instructions pre-compiled binaries are used to reduce dependencies and save time.

Tested with:

  • Windows XP 32-bit
  • Qt libraries 4.8.5 for Windows (MinGW 4.4)
  • gperf (pre-compiled)
  • admsXml (pre-compiled)
  • Qucs sources from Git master (after 0.0.17)

Note:

The Qt libraries for Windows used to available with a matching MinGW compiler. The latest Qt4 libraries distributed so far by Digia do not include the compiler. Qt 4.8.5 MinGW libraries requires GCC version 4.4.

The steps below illustrate the build process on Windows XP. Newer Windows versions should follow a similar method.

Compilation of Qt from source can be achieved with a newer MinGW GCC version. This route is time consuming and not covered here.


1 - Install MinGW with GCC 4.4:

  • Download MinGW (GCC 4.4)

  • Extract it to: C:\MinGW-gcc440

  • Fix bug on library name

    • Open this file on a text editor: C:\MinGW-gcc440\lib\gcc\mingw32\4.4.0\libstdc++.a

    • On line 11, replace:

      library_names='libstc++.dll.a'

    • by

      library_names=''

2 - Install pre-compiled gperf and admsXml:

3 - Install Qt libraries:

4 - Install MSYS shell:

  • From the latest MinGW, install the MSYS shell
    • Download mingw-get-setup.exe
    • Install it to: C:\MinGW
    • Install only MSYS, select the mingw-developer-tools, apply to install
    • Make sure c:\MinGW\bin is on the Windows PATH.

5 - Build Qucs

  • Get the sources, either the latest GIT or a daily snapshot.

    • Lets assume the Qucs source is on C:\git\qucs
  • Launch MSYS

    • Open C:\MinGW\msys\1.0\msys.bat
  • Mount the required MinGW version (with GCC 4.4)

    mount --replace c:/mingw-gcc440 /mingw
    
  • Build Qucs GUI

    export QTDIR=/c/Qt/4.8.5/
    cd /c/git/qucs/qucs
    autogen.sh
    ./configure --enable-maintainer-mode --prefix="C:/Qucs"
    make
    make install
    
  • Build Qucs Core

The GNU Libtool is used to bootstrap, to use the one in MinGW run:

```
mount --replace c:/mingw /mingw
cd /c/git/qucs/qucs-core
./bootstrap.sh
```

Switch back to use the MinGW-GCC4.4

```
mount --replace c:/mingw-gcc440 /mingw
./configure --enable-maintainer-mode --with-mkadms=/mingw/bin/admsXml.exe --prefix="C:/Qucs"
make
make install
```
  • Test

    Qucs executables should be installed at c:\Qucs\bin