OctoMap / octomap

An Efficient Probabilistic 3D Mapping Framework Based on Octrees. Contains the main OctoMap library, the viewer octovis, and dynamicEDT3D.
http://octomap.github.io
1.87k stars 652 forks source link

Linking octomap to new project | octomap/octomap.h: No such file or directory #376

Closed RyanWagner10000 closed 2 years ago

RyanWagner10000 commented 2 years ago

Can't get octomap to link with personal c++ project. I followed the directions to put some lines in my CMakeLists.txt file, but no matter what I do it can't find octomap. I tried executing the sample-script given, but that still errored with the same message: main.cpp:2:10: fatal error: octomap/octomap.h: No such file or directory which is line: #include <octomap/octomap.h>

Here is what my CMakeLists.txt looks like if it helps. Maybe there's a problem with linking the direct path to something? Any help would be appreciated! cmake_minimum_required(VERSION 3.10)

# set the project name project(convert_binvox)

# Octomap find_package(octomap REQUIRED) include_directories(${OCTOMAP_INCLUDE_DIRS}) link_directories(${OCTOMAP_LIBRARY_DIRS}) link_libraries(${OCTOMAP_LIBRARIES})

# add the executable add_executable(convert_binvox main.cpp)

Autostone-c commented 1 year ago

hey guys, i also get this error, How did you solve it?