CompileOnUnix

Prerequisites
To compile FreeCAD under Linux you have to install all libraries mentioned in ThirdPartyLibraries first. As compiler you should have installed >= gcc3.x.y.

To avoid any linker problems during the build process it would be a good idea to have the library paths either in your LD_LIBRARY_PATH variable or in your ld.so.conf file.

During the compilation some Python scripts get executed. So the Python interpreter has to work properly.

For more details have also a look to README.Linux in your sources.

First of all you should build the Qt plugin that provides all custom widgets of FreeCAD we need for the Qt Designer. The sources are located under //src/Tools/plugins/widget//. So far we don't provide a makefile -- but calling 'qmake plugin.pro' creates it. Once that's done, calling 'make' will create the library //libFreeCAD_widgets.so//. To make known this library to your Qt Designer you have to copy the file to //$QTDIR/plugin/designer//.

Configuration
For the build process of FreeCAD we provide a configure script. Just type in './configure --help' to have an overview of all options you can specify. Normally you need none of them - unless you have one of your libraries installed in a really uncommon directory. After configuration has finished type 'make' into your console.

If any bugs occurs while building from sources, please double-check this page and README.Linux file, then you could jump to CompileBugs.

Installation
After having built FreeCAD successfully, with a simple 'make install' you can install it onto your machine.The default install directory is /home/ /FreeCAD, so you don't need root privileges therefore.

Modules
To build the modules (located in src/Mod) for FreeCAD you have to repeat the same procedure for each of them. Please use the order: Image, Part, Import, Mesh and then Raytracing, because one Module needs sometimes an other. The 'make install' creates the libraries in /home/ /FreeCAD/Mod/ /lib - as default directory, creates some symbolic links that Python needs and copy the Init.py and !InitGui.py files to the right location.

We need these symbolic links because Python expects them to load the libraries. The .py files are needed by FreeCAD to initialize the workbenches.

Note: The Test and the Sketcher modules are pure Python modules, so you need not build them. Just copy the directories to their desired locations.

After having built and installed the core and module libraries, go to FreeCAD/bin and try ./FreeCAD invoking the main window. So, just have fun!