Compile on Windows with VS2013

Prerequisites
First you will need to install git to be able to download the source code.Your can get git here: http://git-scm.com/downloads

Some information how to set-up a local tracking branch and a working branch can be found here: http://www.freecadweb.org/wiki/index.php?title=Source_code_management

basically to get going you need to open a terminal and cd to the directory you want the source,start git, then type:

git clone git://git.code.sf.net/p/free-cad/code free-cad-code

Next you'll need to download and extract a windows libpack in another directory. http://sourceforge.net/projects/free-cad/files/FreeCAD%20LibPack/

Assuming that your Win Vista or later and x64 choose:

FreeCADLibs_11.0_x64_VC12.7z

You can download 7-zip here if you need it to extract the lib files here: [url]http://www.7-zip.org/[/url]

next you will need Cmake, available here: http://www.cmake.org/download/

Current master will build with cmake 3.x.x, so on Windows at least you can download the latest version.

Lastly you will need the C-compiler. MS VS 12 2013 Community Edition Update 4 is Free for personal and Open Source Projects. It can be downloaded here:

http://www.visualstudio.com/en-us/news/vs2013-community-vs.aspx

Now you have the source code and the tools you'll need to compile FreeCAD on Windows.

Building with Visual Studio 12 2013
1) Configure CMake using GUI

Open CMake GUI Specify source folder Specify build folder Click Configure Specify the generator as Visual Studio 12 x64

This will begin configuration and should fail because the location of FREECAD_LIBPACK_DIR is unset.

Expand the FREECAD category and set FREECAD_LIBPACK_DIR to the correct location Check FREECAD_USE_EXTERNAL_PIVY Click Configure again There should be no errors Click Generate Close CMake Copy libpack\bin folder into the new build folder CMake created

2) Building with Visual Studio

Open Visual Studio 12 2013 File -> Open -> Project/Solution Open FreeCAD_Trunk.sln from the build folder CMake created Switch the Solutions Configuration dropdown at the top to Release X64 Build -> Build Solution to build This will take a long time...

If you don't get any errors your done. Exit VS and start freecad from the bin folder of the build directory.