Open fghoussen opened 5 months ago
I have just tried to force include paths but compilation fails:
/tmp/SensorsCalibration/lidar2lidar/manual_calib/build> git diff
diff --git a/lidar2lidar/manual_calib/CMakeLists.txt b/lidar2lidar/manual_calib/CMakeLists.txt
index 9a191c9..0bcfc2a 100755
--- a/lidar2lidar/manual_calib/CMakeLists.txt
+++ b/lidar2lidar/manual_calib/CMakeLists.txt
@@ -1,9 +1,10 @@
cmake_minimum_required(VERSION 2.8.3)
project(LidarToLidar)
-set(CMAKE_CXX_FLAGS "-std=c++11 -g -Wall")
+set(CMAKE_CXX_FLAGS "-std=c++11 -g -Wall -I/tmp/Pangolin/local/include -I/usr/include/jsoncpp")
set(CMAKE_CXX_STANDARD 14)
/tmp/SensorsCalibration/lidar2lidar/manual_calib/build> make
...
[ 25%] Building CXX object CMakeFiles/LidarToLidar.dir/src/run_lidar2lidar.cpp.o
In file included from /tmp/Pangolin/local/include/pangolin/var/var.h:37,
from /tmp/Pangolin/local/include/pangolin/display/widgets.h:31,
from /tmp/Pangolin/local/include/pangolin/pangolin.h:40,
from /tmp/SensorsCalibration/lidar2lidar/manual_calib/src/run_lidar2lidar.cpp:9:
/tmp/Pangolin/local/include/pangolin/var/varstate.h: In member function ‘std::map<std::__cxx11::basic_string<char>, std::shared_ptr<pangolin::VarValueGeneric> >::iterator pangolin::VarState::AddVar(const std::shared_ptr<pangolin::VarValue<T> >&, bool)’:
/tmp/Pangolin/local/include/pangolin/var/varstate.h:242:16: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
242 | const auto [it, success] = vars.insert(VarStoreMap::value_type(var->Meta().full_name, var));
| ^
In file included from /tmp/Pangolin/local/include/pangolin/gl/gl.h:324,
from /tmp/Pangolin/local/include/pangolin/handler/handler.h:31,
from /tmp/Pangolin/local/include/pangolin/display/widgets.h:32:
/tmp/Pangolin/local/include/pangolin/gl/gl.hpp: In member function ‘void pangolin::GlTexture::CopyFrom(const pangolin::GlTexture&)’:
/tmp/Pangolin/local/include/pangolin/gl/gl.hpp:348:5: error: ‘glCopyImageSubDataNV’ was not declared in this scope
348 | glCopyImageSubDataNV(tex.tid, GL_TEXTURE_2D, 0, 0, 0, 0,
| ^~~~~~~~~~~~~~~~~~~~
did you solve this?
Found solution in issue #102 Change CMAKE to:
cmake_minimum_required(VERSION 3.5)
project(lidar2camera)
set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_FLAGS "-std=c++11")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -g")
set(CMAKE_CXX_STANDARD 14)
find_package(OpenCV REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})
find_package(Pangolin REQUIRED)
include_directories(${Pangolin_INCLUDE_DIRS})
find_package(Boost REQUIRED filesystem system)
include_directories(${BOOST_INCLUDE_DIRS})
find_package(PCL REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
include_directories(${PROJECT_SOURCE_DIR}/include)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
file(GLOB_RECURSE PARSER_PATH src/*.cpp)
add_library(${PROJECT_NAME} STATIC ${PARSER_PATH})
target_link_libraries(${PROJECT_NAME} ${PCL_LIBRARIES} ${OpenCV_LIBS} ${Boost_SYSTEM_LIBRARY} ${Pangolin_LIBRARIES})
add_executable(run_lidar2camera src/run_lidar2camera.cpp )
target_link_libraries(run_lidar2camera ${PCL_LIBRARIES} ${OpenCV_LIBS} ${PROJECT_NAME} ${Pangolin_LIBRARIES} libjsoncpp.a)
As it seems there is no debian package for Pangolin, I build it from source:
Now Trying to build this repo doesn't work:
How to fix this compilation error?