Downloading and Compiling LibreCAD from Source (for Linux users)

LogoLibrecad_logo
LibreCAD is an Application for Computer Aided Design (CAD) in two dimension (2D). With LibreCAD you can create technical drawings such as plans for building, interiors, mechanical parts or schematics and diagrams.
librecad_icon
Note: If we have installed Qt-4 dependencies and the build tool qmake was installed Qt5 and Qt4 both. But when we use $qmake librecad.pro, it uses qmake-qt5. So we need to use qmake-qt4 for Qt4 based dependencies. But qt5 -dev is installed on our system, then there will be no such problem for qmake (qmake-qt5).
Fired up the terminal because you need to install the qt4 development libraries, tools, compiler and git.
$ sudo apt-get install g++ gcc qmake git-core libqt4-dev qt4-qmake libqt4-help qt4-dev-tools libboost-all-dev libmuparser-dev libfreetype6-dev $ sudo apt-get build-dep librecad
Now you have a development environment on your computer. You need to download the source of LibreCAD.
 
DOWNLOADING:
The source code including the latest development of LibreCAD is available from the project page at github, https://github.com/LibreCAD/LibreCAD ,
clone the git repository of LibreCADcin Desktop (You can use any Directory) $ git clone https://github.com/LibreCAD/LibreCAD.git
 
COMPILATION: 
Now you can run qmake (or qmake-qt4) to create a makefile and run make to compile LibreCAD.
Commands to run:
Make sure that you are in the folder (Librecad).
$cd LibreCAD 
$qmake-qt4 librecad.pro
$make (or $time make)
librecad.pro is a project file. qmake creates a makefile. Make command will compile the project. Compiling LibreCAD might take a while, depending on the speed of your computer, but just let it run until it finishes.
 
*———to note the time takes to compile——*
$time make
My system took this time for compilation 😉
real 11m40.172s
user 10m49.105s
sys 0m46.903s
*——-to check the version of Librecad——–*
Goto Help menu in menu bar > About,
Version: master
SCM Revision: 2.0.0beta1
Compiled on: Apr 21 2013
 
*————-if you find errors—————*
1) If error is muparser error:rs_math: muparser not found,
then install muparser library by giving command in terminal.

 $ sudo apt-get install libmuparser-dev

After installing libraries replace:
#include <muParser.h> with #include “/usr/include/muParser/muParser.h”
in the file librecad/src/lib/math/rs_math.cpp

2) If error is boost library error: boost library not found

 $sudo apt-get install libboost-dev
3) If you are getting erros about Qt: svg, then there is a problem with qmake. Run qmake-qt4 instead of qmake.
 
To finally run LibreCAD, execute the following commands:
$cd unix
$./librecad Enjoy...... :)
Advertisements

About Jasleen Kaur

Hi, I am Jasleen kaur, a Computer Science Student.
This entry was posted in LibreCAD and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s