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

it sames I can not read ply file? #43

Closed
HeXu1 opened this issue Dec 6, 2019 · 4 comments
Closed

it sames I can not read ply file? #43

HeXu1 opened this issue Dec 6, 2019 · 4 comments

Comments

@HeXu1
Copy link

HeXu1 commented Dec 6, 2019

coding:
" std::string file_path="data/test.ply";
cilantro::PointCloud3f cloud(file_path);"

when I was building,the output is
"/usr/local/include/cilantro/utilities/ply_io.hpp:11: undefined reference to tinyply::PlyFile::PlyFile()' /usr/local/include/cilantro/utilities/ply_io.hpp:12: undefined reference to tinyply::PlyFile::parse_header(std::istream&)'
/usr/local/include/cilantro/utilities/ply_io.hpp:11: undefined reference to `tinyply::PlyFile::~PlyFile()'...."

And when I try to use the visualizer,the output is :
" undefined reference to cilantro::Visualizer::Visualizer(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /home/cidi/learning_code/myLocalization1/src/jiqunLocalization.cc:569: undefined reference to cilantro::Visualizer::spinOnce()'
/home/cidi/learning_code/myLocalization1/src/jiqunLocalization.cc:563: undefined reference to cilantro::Visualizer::~Visualizer()' /home/cidi/learning_code/myLocalization1/src/jiqunLocalization.cc:563: undefined reference to cilantro::Visualizer::~Visualizer()' "

the Pangolin is builded fine.

I can running your demo fine ,but it does not work in my project~
hope for you answer,thanks.

@HeXu1
Copy link
Author

HeXu1 commented Dec 6, 2019

and I just can run Kdtree example, it doesn't need read ply data or visualizer~

@kzampog
Copy link
Owner

kzampog commented Dec 13, 2019

Hi,

Apologies for the late reply. It seems you are not linking against the library. If you used the default CMake settings for building cilantro and also use CMake for your project, you could simply try a CMakeLists.txt that looks like:

cmake_minimum_required(VERSION 3.9)
project(my_project)

find_package(cilantro)

add_executable(test_app test_app.cpp)
target_link_libraries(test_app ${cilantro_LIBRARIES})

Let me know if you still run into issues!

@HeXu1
Copy link
Author

HeXu1 commented Dec 13, 2019

oh ,it works.
thanks for your help.Wish everything goes well.

@kzampog
Copy link
Owner

kzampog commented Dec 13, 2019

Great! No problem :)

@kzampog kzampog closed this as completed Dec 13, 2019
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

2 participants