Ubuntu system pangolin and libtorch caused by a connection error

In the slam system, I use as a visual pangolin, no problem at all.
Then I trained a network, do the object detection, the magic happened:

CMakeFiles/runRoadVehicle.dir/Viewer/Viewer.cpp.o: In function `vehicle::Viewer::draw()':
/home/fy/workspace/master/hd-map-generation/src/roadPlane/src/example/Viewer/Viewer.cpp:83: undefined reference to `pangolin::CreateWindowAndBind(std::string, int, int, pangolin::Params const&)'
/home/fy/workspace/master/hd-map-generation/src/roadPlane/src/example/Viewer/Viewer.cpp:91: undefined reference to `pangolin::CreatePanel(std::string const&)'
CMakeFiles/runRoadVehicle.dir/Viewer/Viewer.cpp.o: In function `void pangolin::InitialiseNewVarMeta<bool>(pangolin::VarValue<bool>&, std::string const&, double, double, int, bool)':
/usr/local/include/pangolin/var/var.h:66: undefined reference to `pangolin::Split(std::string const&, char)'
collect2: error: ld returned 1 exit status
CMakeFiles/runRoadVehicle.dir/build.make:167: recipe for target '../bin/runRoadVehicle' failed

Why are so many pangolin function no problem, these problems, baffled. I think about changes, it seems that only added to libtorch cmakelist link library functions.
So I related to the detection commenting out the code, the compiler no problem. This ye do, obviously libtorch incompatible with the pangolin, so I spend a Google Dafa, you want to find the point of clues and see the Xiongtai answer:
Here Insert Picture Description
Could I just compile it manually libtorch to resolve, but I do not want to re compile, then looked at the official website:
Here Insert Picture Description
found that there is a cxx11 ABI download link, then downloaded to replace the original, and then compile the project again, the compiler success!

Released six original articles · won praise 0 · Views 151

Guess you like

Origin blog.csdn.net/feiyang_luo/article/details/103999125