Open3D
0.17.0

Getting Started

  • Introduction
  • Getting started
  • Build from source
  • Link Open3D in C++ projects
    • CMake
    • pkg-config
  • Build documentation
  • Open3D-ML
  • ARM support
  • Docker

Tutorial

  • Geometry
  • Geometry (Tensor)
  • Pipelines
  • Pipelines (Tensor)
  • Visualization
  • Core
  • Dataset
  • Reconstruction system
  • Reconstruction system (Tensor)
  • Sensor
  • Reference

Contribute

  • Contributing to Open3D
  • Contribution methods
  • Open3D style guide

C++ API

  • C++ documentation

Python API

  • open3d.camera
  • open3d.core
  • open3d.data
  • open3d.geometry
  • open3d.io
  • open3d.t
  • open3d.ml
  • open3d.pipelines
  • open3d.utility
  • open3d.visualization

Python Examples

  • Camera
  • Geometry
  • IO
  • Pipelines
  • Utility
  • Visualization
Open3D
  • Docs »
  • Link Open3D in C++ projects

Link Open3D in C++ projects¶

CMake¶

We provide two example CMake projects to demonstrate how to use Open3D in your CMake projects.

  • Find Pre-Installed Open3D Package in CMake This option can be used if you’d like Open3D build and install Open3D first, then link your project to Open3D.

  • Use Open3D as a CMake External Project This option can be used if you’d like Open3D to build alongside with your project.

You may download Open3D library binaries for common platform and build configurations from GitHub releases. For instructions on how to compile Open3D from source, checkout Build from source.

pkg-config¶

If you don’t use the CMake build system in your project, you can use the simpler pkg-config tool to get the build settings needed to link it with Open3D. This is available on Linux and macOS, if you use Open3D shared libraries. Note that we recommend using CMake over pkg-config, since the latter cannot properly account for complex build configurations.

For example, you can equivalently build the Draw executable from the above example project with this command:

export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:<Open3D_install_path>/lib/pkgconfig"
c++ Draw.cpp -o Draw $(pkg-config --cflags --libs Open3D)

pkg-config reads .pc files included in the Open3D install and fills in the required build options. Note that the pkg-config --libs options must appear after your source files to avoid unrecognized symbol linker errors.

Next Previous

© Copyright 2018 - 2021, www.open3d.org

Built with Sphinx using a theme provided by Read the Docs.
Docs version 0.17.0
Versions
    main main C++
    0.19.0 (release) 0.19.0 C++ (release)
    0.18.0 0.18.0 C++
    0.17.0 0.17.0 C++
    0.16.0 0.16.0 C++
    0.15.1 0.15.1 C++
    0.14.1 0.14.1 C++
    0.13.0 0.13.0 C++
    0.12.0 0.12.0 C++
    0.11.1 0.11.1 C++
    0.11.0 0.11.0 C++
    0.10.0 0.10.0 C++
    0.9.0 0.9.0 C++
    0.8.0 0.8.0 C++
    0.7.0 0.7.0 C++
    0.6.0 0.6.0 C++