Building QCAD from Sources using the Visual Studio IDE

Tips and tricks you want to share with other users. Tutorials, user submitted documentation, etc.

Moderator: andrew

Post Reply
User avatar
andrew
Site Admin
Posts: 9019
Joined: Fri Mar 30, 2007 6:07 am

Building QCAD from Sources using the Visual Studio IDE

Post by andrew » Fri Sep 02, 2016 11:27 am

Getting the Sources
Clone or download the latest QCAD Community Edition sources from github at:
https://github.com/qcad/qcad

Alternatively, you can download the sources of the latest official QCAD release from our web site at:
http://www.qcad.org/en/qcad-downloads-trial
-> QCAD Source Code

Compiling QCAD using Microsoft Visual Studio in a Nutshell
- Install Qt 5.5.1, 5.6.0 or 5.7.0

- On a command line, switch to the QCAD directory and run:

Code: Select all

qmake -r -spec win32-msvc2012 -tp vc
Note that qmake is a utility that comes with Qt. The above step generates a so-called solution file (sln) which can later be loaded using Visual Studio. It also generates .vcproj files for the various modules of QCAD.

- Using the Visual Studio IDE, open and build the sln file that is created in the QCAD directory.

- The sln file for the Qt script bindings might have to be built separately when using Microsoft Visual Studio as a build tool:
- Load and build the sln file in
qcad/src/3rdparty/qt-labs-qtscriptgenerator-x.x.x
where "x.x.x" is your Qt version, e.g. "5.7.0".

Running QCAD

The above steps should give you a startable qcad.exe in qcad/src/debug or qcad/src/release.

Notes

Note that the recommended way to compile QCAD sources under Windows is using qmake and nmake (or jom) on a command line as described in detail on our web site at:
http://www.qcad.org/en/component/conten ... om-sources

Post Reply

Return to “QCAD Tips and Tutorials”