Context : I am following this guide to generate my Visual Studio project with the Point Cloud Library PCL, it seems to be the only way to use it.
Problem : I have realised that with this method I can not include other libraries like the Bitmap_image.hpp or even the string.h
I've tried :
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
project(MY_GRAND_PROJECT)
find_package(PCL 1.3 REQUIRED COMPONENTS common io)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
add_executable(pcd_write_test pcd_write.cpp)
target_link_libraries(pcd_write_test ${PCL_COMMON_LIBRARIES} ${PCL_IO_LIBRARIES} ${string})
The result:
It generates the project. PCL works perfectly and the line
#include <string>
does not show error.
But
string a;
throws "Error C2065 'string': undeclared identifier" and the same happens with other libraries.
Any solution?