Ubuntu 16.04 Compilation VTK7.1

Source: Internet
Author: User

The compilation process is divided into three steps:

1th Step: Prepare the compilation environment

2nd step: CMake Generation Project

3rd step: Compile and install

1th Step: Prepare the compilation environment

Ubuntu needs to install three packages before compiling VTK7.1: Qt5,x11,opengl,cmake

1. Install Qt5, download qt-opensource-linux-x64-5.7.1.run from QT official website, address: https://www.qt.io/download-open-source/#section-2

Switch to run at Ubuntu Command Terminal:

sudo chmod u+x qt-opensource-linux-x64-5.7. 1 . Runsudo. /qt-opensource-linux-x64-5.7. 1. Run

Then follow the prompts to set the installation path to complete the installation.

2. Install X11: Run command at Ubuntu Command Terminal:

sudo apt-get install Libx11-dev libxext-dev libxtst-dev libxrender-dev libxmu-dev Libxmuu-dev

3. Install OpenGL: Run command on Ubuntu Terminal:

sudo apt-get install build-essential  libgl1-mesa-dev  libglu1-mesa-dev Libglut-dev

4. Install CMake: Run command at Ubuntu Command Terminal:

sudo apt-get

2nd step: CMake Generation Project

1. When you are ready to compile the environment, download the VTK source code vtk-7.1.0.zip and download it on the VTK website. Switch to the source code directory and run the command at the terminal:

sudo unzip-o-d/home/source/vtk vtk-7.1. 0. zip

2. Open the CMake software GUI interface and set "where is the source code:" for the directory where the sources are located, such as/HOME/SOURCE/VTK. Set "where to build the binaries:" for the catalog generated for the project, for example:/home/source/vtk_build

3. Click the "Configure" button and select "CurrentGenerator" as "Unix makefiles" In the popup dialog box.

4. Select "VTK_GROUP_QT" option, click "Configure" button again, prompt warning message, need to set Qt installation path, set the path, click "Configure" button again

5. Set the "cmake_install_prefix" directory to the directory where you want to install VTK

5. Prompt "ConfigureDone", click "Generate" button, in Vtk_build will generate project file

3rd step: Compile and install

The command terminal switches to the Vtk_build directory and then runs the command at the terminal:

sudo makesudo make install

The middle needs to wait a long time to compile, about 1 hours or so

Disclaimer This blog article is not special note are original, reproduced please indicate the author and the original address

Ubuntu 16.04 Compilation VTK7.1

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.