Open3D icon indicating copy to clipboard operation
Open3D copied to clipboard

How to configure CMakeLists.txt for cpp interface?

Open zjudmd opened this issue 8 years ago • 2 comments

Hi Authors,

Is there some tutorials or documentation about how to configure CMakeLists.txt file for c++ interface? I am trying to use c++ but failed to compile a simple one. I include "Core/Core.h" and want to create a pointcloud instance, I want to use three::PointCloud cloud; to create a new cloud, When I tried to compile it with it, errors like undefined reference to 'omp_get_num_threads' show up. I wonder if I used a wrong syntax.

If the syntax is right, I probably made something wrong with my CMakeLists.txt file. Do you have a template CMakeLists.txt to include headers and link libraries for Open3D ? Thanks a lot.

Best,

zjudmd avatar Mar 05 '18 17:03 zjudmd

Related to #130.

The best answer for your question for right now is to add your custom cpp file in src/Test folder and add entry of your application in src/Test/CMakeList.txt file. The Open3D build chain will generate standard-alone executable for you.

syncle avatar Mar 05 '18 18:03 syncle

Thanks, I'll check that.

zjudmd avatar Mar 05 '18 18:03 zjudmd