Compiling QCAD from Sources

These instructions guide through the process of installing QCAD from sources on your platform. Please note that these instructions only cover one possible scenario for each platform. You may want to use another compiler or an alternative version of Qt, but you might have to change source code or project files to succeed.

Checking out the QCAD Sources

To check out the QCAD source code, please clone our git repository as follows:

git clone git@github.com:qcad/qcad.git

Or (using HTTPs):

git clone https://github.com/qcad/qcad.git

The procedure to compile the source code depends on the platform you are on: 

If you are using Solaris, FreeBSD or an other unix system, the Linux instructions might also work for you.

Windows

  1. Download and install a C++ compiler and SDK, for example:
    • Visual C++ 2010
  2. Download and install Qt 4.8.4:
    • Download the ZIP file called qt-everywhere-opensource-src-4.8.4.zip
    • Extract the ZIP file
    • Configure Qt. E.g. on cygwin with:
      configure.exe -platform win32-msvc2010 -debug
      or:
      configure.exe -platform win32-msvc2010 -release
    • Compile Qt. E.g. on cygwin with:

      nmake
    • Add C:\Qt\qt-everywhere-opensource-src-4.8.4\bin to your PATH environment variable
    • Set environment variable QMAKESPEC to win32-msvc2010
  3. Configure QCAD. For example on cygwin with:

    cd /home/user/qcad
    qmake -r
  4. Compile QCAD. For example on cygwin with:

    nmake
  5. Launch QCAD. E.g. from cygwin with:
    ./debug/qcad.exe

Mac OS X

  1. Download and install the latest version of XCode for your platform.
  2. Download and install Qt 4.8.4:
    • Configure Qt:

      cd qt-everywhere-opensource-src-4.8.4
      ./configure -fast -opensource -arch x86 -release \
      -no-qt3support -qt-zlib -qt-libtiff -qt-libpng -qt-libmng \
      -qt-libjpeg -confirm-license
    • Compile Qt:

      make 
    • Add ~/opt/qt-everywhere-opensource-src-4.8.4/bin to your PATH environment variable:

      export PATH=~/opt/qt-everywhere-opensource-src-4.8.4/bin:$PATH
  3. Configure QCAD:

    cd ~/qcad
    qmake -r
  4. Compile QCAD:

    make
  5. Launch QCAD:

    cd release
    ./QCAD.app/Contents/MacOS/QCAD

Linux

  1. Check that you have the following (including dependencies) installed:
    • gcc version 4
    • make
    • libx11-dev
    • libxext-dev
    • libxrender-dev
    • libglu1-mesa-dev (Ubuntu)
    • libfreetype6-dev (Ubuntu)
    • libfontconfig1-dev (Ubuntu)
    • libssl-dev (Ubuntu)
    • libdbus-1-dev (Ubuntu)
    • libsm-dev (Ubuntu)
    • Mesa-devel (OpenSUSE)
    • dbus-1-devel (OpenSUSE)
    • libsm-devel (OpenSUSE)
    • glu-devel (OpenSUSE)
  2. If you wish to compile / run QCAD 3 32bit on a 64bit Linux installation, you will also need:
    • ia32-libs
    • Mesa-32bit (OpenSUSE)
  3. Download and install Qt 4.8.4:
    • Configure Qt:

      cd qt-everywhere-opensource-src-4.8.4
      ./configure -fast -opensource -release -no-qt3support -fontconfig -dbus \
      -sm -qt-libpng -qt-libjpeg -qt-libmng -qt-zlib -openssl -opengl desktop \
      -xrender -webkit -confirm-license
    • Compile Qt:

      make
    • Add ~/opt/qt-everywhere-opensource-src-4.8.4/bin to your PATH environment variable:

      export PATH=~/opt/qt-everywhere-opensource-src-4.8.4/bin:$PATH
  4. Configure QCAD:

    cd ~/qcad
    qmake -r
  5. Compile QCAD:

    make
  6. Launch QCAD:

    cd release
    LD_LIBRARY_PATH=. ./qcad-bin