User:DeepSOIC

From FreeCAD Documentation
Revision as of 18:33, 19 June 2015 by DeepSOIC (talk | contribs)

setting up MSVC2013 compiler without installing Visual Studio

This is a short story of how I managed to set up FreeCAD compilation on Windows8.1 with MSVC2013 compiler without actually installing the huge visual studio express.

First, I used another computer to install the full visual studio, in order to get the compiler files. I found the compiler under drive:\path\to\visual\studio\VC\bin

Copied the compiler binaries and standard libraries to another computer. I copied the following folders to C:\Qt\msvc12rip

  • drive:\path\to\visual\studio\VC\bin
  • drive:\path\to\visual\studio\VC\lib
  • drive:\path\to\visual\studio\VC\include

Then I installed Windows SDK (google for it). For those who don't know, it is a set of headers, libs and tools to compile Windows programs. By default, it installed itself to

Then I installed CMake and Qt creator (just the creator, i.e. the environment, not the actual Qt, to save space).

Next was the trickiest part - to set up the compiler in Qt Creator.

compiler in Qt Creator

32 bits

Setting the compiler for 32 bit is quite straightforward. 1. Set up the compiler under Compilers tab in settings: Add a custom compiler:

  • name = msvcrip (the name doesn't matter, it is up to you)
  • Compiler path: C:\Qt\msvc12rip\VC\bin\cl.exe
  • Make path: C:\Qt\msvc12rip\VC\bin\nmake.exe
  • ABI: x86-windows-msvc2013-pe-32bit
  • header paths - nothing
  • error parser: MSVC

2. Under kits tab, I added a kit, and set it up like this:

  • name: FreeCAD32 (again, up to you)
  • Device type: Desktop
  • Device: Local PC
  • Compiler: msvcrip (or whatever you named it in step 1)
  • Environment: (correct the paths to your setup)
INCLUDE=C:\Program Files (x86)\Windows Kits\8.1\Include\um\;C:\Qt\msvc12rip\VC\include\
LIB=C:\Qt\msvc12rip\VC\lib\;C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\x86\
LIBPATH=C:\Qt\msvc12rip\VC\lib\;C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\x86\
PATH=C:\Qt\msvc12rip\VC\bin\;C:\Program Files (x86)\Windows Kits\8.1\bin\x86\
  • Debugger: (optional) set to 32-bit (x86)
  • Qt version: None

The environment part of the settings took me the most trouble to configure