Building opencascade On Debian

Source: Internet
Author: User
Tags automake
Building opencascade On Debian

[Email protected]

Abstract.When you are familiar with opencascade on Windows, you should try it on Linux operating system, because of Debian is also open source like opencascade. the paper is focus on how to build the opencascade On Debian.

Key words.Opencascade, Linux, Debian, building

1. Introduction

Because opencascade is a geometric modeling algorithm library written in C ++ and has good cross-platform performance, it is decided to compile it on Linux. According to the opencascade documentation, on Linux, OCC selects Debian as the general test system, so it also installs a Debian 64bit system.

Figure 1.1 Debian 64bit is a platform used for regular testing of contributions

Debiangnu/Linux was launched by a Niu Ren named ianmurdock in 1993. his name starts with Ian, and his wife's name starts with Deb, so with the power of love, he initiated the debiangnu/Linux organization. Debian is officially pronounced /? D ?. Bi .? N/, the corresponding Chinese pronunciation can be waiting for guests.

After using Debian, I feel that there are so many open-source libraries! If you select Debian, you will not feel lonely. A wide range of organizations and individuals are using Debian. Debian has an astonishing number of software packages, each of which is free. The installation and update are both convenient. You only need to use the command apt-Get update and apt-Get install to automatically update and install the software.

Figure 1.2 Debian the universal Operating System

The computer that installed the Debian system was a laptop a few years ago, and the configuration was somewhat old. Open the Debian system monitor to view the Debian system information, as shown in:

Figure 1.3 Debian system info

2. Preliminary

After Debian is installed and the source code of opencascade is downloaded, some preparation work is required to compile opencascade:

V configure the C ++ programming environment: APT-Get install build-essential

V configure the C ++ compiling environment: APT-Get install automake Autoconf

V configure OpenGL library: APT-Get install freeglut3-dev

At the beginning, the installation of autotools encountered a problem. Finally, the problem was caused by the source. After the source is changed to the Debian default USA source, autotools can be installed automatically. Autotools cannot be installed on images of the original version 163.

To compile opencascade, you need to use the OpenGL library. The configure before compilation checks whether the GL library is correctly set. If the OpenGL library is not correctly installed, several modules cannot be correctly compiled. First install the driver of the video card, and then install the freeglut library to solve the problem.

3. Building 3rd-party Libraries

Opencascade third-party libraries are divided into two types:

V required Library: Tcl/tk 8.5-8.6, FreeType-2.4.10-2.4.11;

Optional V Library: TBB 3. x-4.x, gl2ps 1.3.5-1.3.8, freeimage 3.14.1-3.15.4;

All these third-party libraries can be downloaded and installed from the official Debian source. You only need to execute the following command:

Sudo apt-Get INSTALL \ tcllib tklib TCL-dev TK-dev \ libfreetype-dev \ libxt-dev libxmu-dev \ libgl1-mesa-dev \ libfreeimage-dev \ libtbb-dev \ libgl2ps-dev

If some databases cannot be found, you can try another source. Some databases cannot be found for the original 163 source, and can be changed to the source of USA or other countries. The speed is also good.

Of course, these libraries can also be compiled by yourself. We recommend that you compile them yourself and familiarize yourself with the use of the automake tool.

4. Building opencascade with automake

After completing the above preparations, You can compile opencascade. The compilation procedure is as follows:

V runs the build_configure script in the occt directory to generate makefile. In and configure suitable for the system;

V runs configure in the occt directory to generate makefiles. The command is as follows:

$CASROOT/configure<FLAGS> 

<Flags> is a compilation option used to configure third-party libraries and draw. The configuration parameters are as follows:

Figure 4.1 configure options for opencascade

The Configure command is as follows:

Figure 4.2 configure example

Figure 4.3 configure successed status without optional 3 rdparty Products

As shown in, when the build corresponding to component is yes, configure is successful.

If the configure is successful, you can use the make command to compile it. The command is as follows:

Make-J8 install

After V is compiled, run draw. Sh to test opencascade.

Shows the effect of running the Tcl script in opencascade performance test. Both the model and Tcl script can be obtained from the following:

Http://www.cppblog.com/eryar/archive/2014/09/25/208421.html

Because the notebook configuration is relatively old, the running speed is not as fast as new machines. The gridding and display speed of the same number of F1 Racing models are much slower, and the frame rate is much slower.

Finally, opencascade has been compiled successfully In Debian. The next step is to use opencascade to program in Debian.

Today is the national day. It is also cool to stay at home and play with these codes, avoiding the congestion of people mountain people sea.

Figure 4.4 draw test hanress In Debian

Figure 4.5 draw test harness In Debian

5. Conclusion

After opencascade is successfully compiled on Debian, a free portal is opened for program development. Developing programs in a more open environment will no longer be limited. This is better than using Windows.

Opencascade mainly uses autotools for Debian compilation. Therefore, you must install autotools correctly and be familiar with its usage. In this regard, it is useless to get used to Visual Studio, and new tools can only be adapted slowly.

Setting an appropriate Debian update source is also very important. At the beginning, I chose a domestic image based on what I said on the Internet. As a result, some tools cannot be installed automatically, and you can change it to USA.

 

Pdf version: Building opencascade On Debian

Building opencascade On Debian

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.