fatal error: pcl/visualization/pcl_visualizer.h
Your Environment
- Operating System and version:Ubuntu16.04
- Compiler:
- PCL Version:1.9.1
I have installed the pcl successfully including the visualization module, but when I make a project, I ran into a problem as follows
I find that in the cmake step, the pcl directories do not include the visualization dir as follows, what's the matter? I am very confused. Thank you very much

I don't think we will be able to provide much help until gcc starts printing error messages that are in English. :/
@SergioRAgostinho Thank you very much for your answering the error is : fatal error: pcl/visualization/pcl_visualizer.h: NO such file or directory. but I have pcl_visualizer.h file in pcl directory.
Then it's more likely a problem in the CMakeLists.txt of your project. Can you copy paste that file here and also the console output of the configuration stage? Small note, don't create images from text output. Just copy paste the actual text.
@SergioRAgostinho I have sovled this problem, Thank you very much for your answering
Hy there @SunshineDou I have a similar problem, can you please explain, how did you solve this? I'm trying to compile, PCL with libtorch. My CMakeLists.txt is
cmake_minimum_required(VERSION 2.6) include(CheckCXXCompilerFlag) CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11) CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X) if(COMPILER_SUPPORTS_CXX11) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") elseif(COMPILER_SUPPORTS_CXX0X) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") endif()
find_package(PCL 1.7 REQUIRED) find_package(Torch REQUIRED) add_executable(main main.cpp)
include_directories(${PCL_INCLUDE_DIRS}) link_directories(${PCL_LIBRARY_DIRS}) add_definitions(${PCL_DEFINITIONS})
target_link_libraries(main ${PCL_LIBRARIES})
target_link_libraries(main ${TORCH_LIBRARIES}) target_include_directories(main PUBLIC ${PCL_INCLUDE_DIR})
message("STATUS PCL PATH${PCL_INCLUDE_DIRS}")
ERROR:
In function main':
main.cpp:(.text+0x1d44): undefined reference to pcl::visualization::PCLVisualizer::PCLVisualizer(std::string const&, bool)'
main.cpp:(.text+0x1eaf): undefined reference to `pcl::visualization::PCLVisualizer::setPointCloudRenderingProperties(int, double, std::string const&, int)'
collect2: error: ld returned 1 exit status
@SergioRAgostinho I have sovled this problem, Thank you very much for your answering
Thanks,can you tell me how to the sovle the problem?