Skip to content

Unable to link Open3D 0.18.0 to existing c++ project in Xcode [macOS arm64] #6707

Closed
@cwreynolds

Description

@cwreynolds

Checklist

My Question

I am trying to add Open3D 0.18.0 graphics to an existing c++ project in macOS Xcode, on an arm64 machine.

I used the binary https://github.com/isl-org/Open3D/releases/download/v0.18.0/open3d-app-macosx-12_0-arm64-0.18.0.zip from https://github.com/isl-org/Open3D/releases

I temporarily replaced my main.cpp with the contents of https://github.com/isl-org/Open3D/blob/main/examples/cpp/Draw.cpp

I worked through some header issues and am now failing at build/link phase. I dragged all .a libraries from [...]open3d-devel-darwin-arm64-0.18.0/lib into the Xcode project's [target / build phases / Link Binary With Libraries].

The build fails with many undefined symbols (eg below). Should this have worked? Any suggestion on how to fix it?

ld: Undefined symbols:
  _CFArrayAppendValue, referenced from:
      __glfwInitJoysticksNS in libOpen3D_3rdparty_glfw.a[9](cocoa_joystick.m.o)
      __glfwInitJoysticksNS in libOpen3D_3rdparty_glfw.a[9](cocoa_joystick.m.o)
      __glfwInitJoysticksNS in libOpen3D_3rdparty_glfw.a[9](cocoa_joystick.m.o)
      _matchCallback in libOpen3D_3rdparty_glfw.a[9](cocoa_joystick.m.o)
  _CFArrayCreateMutable, referenced from:
      __glfwInitJoysticksNS in libOpen3D_3rdparty_glfw.a[9](cocoa_joystick.m.o)
      _matchCallback in libOpen3D_3rdparty_glfw.a[9](cocoa_joystick.m.o)
      _matchCallback in libOpen3D_3rdparty_glfw.a[9](cocoa_joystick.m.o)
      _matchCallback in libOpen3D_3rdparty_glfw.a[9](cocoa_joystick.m.o)

[...]

  _omp_get_thread_num, referenced from:
      _.omp_outlined. in libOpen3D.a[136](SurfaceReconstructionPoisson.cpp.o)
      _.omp_outlined..275 in libOpen3D.a[136](SurfaceReconstructionPoisson.cpp.o)
      Eigen::internal::general_matrix_matrix_product<long, double, 0, false, double, 0, false, 0, 1>::run(long, long, long, double const*, long, double const*, long, double*, long, long, double, Eigen::internal::level3_blocking<double, double>&, Eigen::internal::GemmParallelInfo<long>*) in libOpen3D.a[150](RaycastingScene.cpp.o)
      _.omp_outlined. in libOpen3D.a[241](TransformationEstimation.cpp.o)
      Eigen::internal::general_matrix_matrix_product<long, double, 1, false, double, 0, false, 0, 1>::run(long, long, long, double const*, long, double const*, long, double*, long, long, double, Eigen::internal::level3_blocking<double, double>&, Eigen::internal::GemmParallelInfo<long>*) in libOpen3D.a[241](TransformationEstimation.cpp.o)
      _.omp_outlined..3 in libOpen3D.a[241](TransformationEstimation.cpp.o)
      _.omp_outlined..4 in libOpen3D.a[241](TransformationEstimation.cpp.o)
      ...
  _omp_in_parallel, referenced from:
      open3d::utility::InParallel() in libOpen3D.a[271](Parallel.cpp.o)
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions