Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example_difference_of_normals does not compile #1097

Closed
VictorLamoine opened this issue Jan 18, 2015 · 6 comments
Closed

example_difference_of_normals does not compile #1097

VictorLamoine opened this issue Jan 18, 2015 · 6 comments
Milestone

Comments

@VictorLamoine
Copy link
Contributor

BUILD_examples ON

CMakeFiles/pcl_example_difference_of_normals.dir/example_difference_of_normals.cpp.o: In function `main':
/home/victor/pcl/src/examples/features/example_difference_of_normals.cpp:212: undefined reference to `pcl::EuclideanClusterExtraction<pcl::PointNormal>::extract(std::vector<pcl::PointIndices, std::allocator<pcl::PointIndices> >&)'
CMakeFiles/pcl_example_difference_of_normals.dir/example_difference_of_normals.cpp.o:(.rodata._ZTVN3pcl19NormalEstimationOMPINS_11PointXYZRGBENS_11PointNormalEEE[_ZTVN3pcl19NormalEstimationOMPINS_11PointXYZRGBENS_11PointNormalEEE]+0x58): undefined reference to `pcl::NormalEstimationOMP<pcl::PointXYZRGB, pcl::PointNormal>::computeFeature(pcl::PointCloud<pcl::PointNormal>&)'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/pcl_example_difference_of_normals] Error 1
make[1]: *** [examples/features/CMakeFiles/pcl_example_difference_of_normals.dir/all] Error 2
make: *** [all] Error 2

Not sure why.. it seems to be be correctly linked.

@taketwo
Copy link
Member

taketwo commented Jan 18, 2015

Has something to do with OMP. I have it disabled, and the thing is built without problems.

@SergioRAgostinho
Copy link
Member

@UnaNancyOwen Can you try to verify this please? With and without OpenMP.

@stefanbuettner
Copy link
Contributor

Hey there,

could #1642 solve the problem? 'Cause it seems as the example should link against NormalEstimationOMP<..., PointNormal> which is not precompiled.

Cheers,
Stefan

@UnaNancyOwen
Copy link
Member

UnaNancyOwen commented Jun 29, 2016

@SergioRAgostinho I tried PCL 1.8.0 examples (set BUILD_examples option to ON) on Visual Studio.
I was set OpenMP_CXX_FLAGS (and OpenMP_C_FLAGS) option to /openmp when to enable OpenMP, and set to /openmp- when to disable OpenMP.
It can be built successfully in both cases that enable and disable OpenMP.
Please tell me if I was testing by wrong way. I will try again the more test. :)

@SergioRAgostinho
Copy link
Member

Just noticed there was nothing on Victor's initial post mentioning that it was specific to Windows. I enabled the examples on my build and it got through with no errors.

@VictorLamoine Can you still reproduce this? The issue dates do Jan 2015 :)

@UnaNancyOwen That was it. Thanks.

@stefanbuettner That's also true... that should have yielded the typical linker error here. At first sight I'm not totally sure why the linker is not complaining when I tried to build it. To be honest I also don't understand why do we instantiate different types between NormalEstimation and NormalEstimationOMP.

@VictorLamoine
Copy link
Contributor Author

I confirm that the latest trunk allows to build the examples without any compilation error on Linux.
Closing as this seems to be solved for every platform we support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants