title: LInking error boost when using cgal and pcl
body: <p>I am getting a boost linking error when using both PCL and cgal in a project (as well as a redefinition warning). PCL and cgal examples both run fine so the installation should be good. </p>
  
  <p>My program to test looks like this:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;CGAL/Simple_cartesian.h&gt;
  #include &lt;pcl/visualization/cloud_viewer.h&gt;
  int
  main()
  {
      std::cout &lt;&lt; "Test "&lt;&lt; std::endl;
      return 0;
  }
  </code></pre>
  
  <p>The error that I get is pasted below: </p>
  
  <pre><code>1&gt;------ Build started: Project: PC_Svr2, Configuration: Debug x64 ------
  1&gt;cloud_viewer.cpp
  1&gt;Unknown compiler version - please run the configure tests and report the results
  1&gt;C:\Program Files\PCL 1.8.1\include\pcl-1.8\pcl/visualization/boost.h(51,1): warning C4005: 'BOOST_PARAMETER_MAX_ARITY': macro redefinition
  1&gt;C:\dev\CGAL-5.0.2\include\CGAL/config.h(115): message : see previous definition of 'BOOST_PARAMETER_MAX_ARITY'
  1&gt;cloud_viewer.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class boost::system::error_category const &amp; __cdecl boost::system::system_category(void)" (__imp_?system_category@system@boost@@YAAEBVerror_category@12@XZ) referenced in function "void __cdecl boost::system::`dynamic initializer for 'native_ecat''(void)" (??__Enative_ecat@system@boost@@YAXXZ)
  1&gt;cloud_viewer.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class boost::system::error_category const &amp; __cdecl boost::system::generic_category(void)" (__imp_?generic_category@system@boost@@YAAEBVerror_category@12@XZ) referenced in function "public: __cdecl boost::thread_exception::thread_exception(int,char const *)" (??0thread_exception@boost@@QEAA@HPEBD@Z)
  1&gt;C:\Users\PCL_Project\PC_svr2\build\Debug\PC_Svr2.exe : fatal error LNK1120: 2 unresolved externals
  1&gt;Done building project "PC_Svr2.vcxproj" -- FAILED.
  ========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
  </code></pre>
  
  <p>When I exclude the PCL include the program runs fine, but when I exclude the cgal include i get a very similar error:</p>
  
  <pre><code>1&gt;------ Build started: Project: PC_Svr2, Configuration: Debug x64 ------
  1&gt;cloud_viewer.cpp
  1&gt;Unknown compiler version - please run the configure tests and report the results
  1&gt;cloud_viewer.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class boost::system::error_category const &amp; __cdecl boost::system::system_category(void)" (__imp_?system_category@system@boost@@YAAEBVerror_category@12@XZ) referenced in function "void __cdecl boost::system::`dynamic initializer for 'native_ecat''(void)" (??__Enative_ecat@system@boost@@YAXXZ)
  1&gt;cloud_viewer.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class boost::system::error_category const &amp; __cdecl boost::system::generic_category(void)" (__imp_?generic_category@system@boost@@YAAEBVerror_category@12@XZ) referenced in function "public: __cdecl boost::thread_exception::thread_exception(int,char const *)" (??0thread_exception@boost@@QEAA@HPEBD@Z)
  1&gt;C:\Users\PCL_Project\PC_svr2\build\Debug\PC_Svr2.exe : fatal error LNK1120: 2 unresolved externals
  1&gt;Done building project "PC_Svr2.vcxproj" -- FAILED.
  ========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
  </code></pre>
  
  <p>I am not sure but I suspect that it might have something to do with my CMakeLists.txt, which I will also paste below:</p>
  
  <pre><code>cmake_minimum_required(VERSION 3.1...3.15)
  project(PC_Svr2)
  find_package(CGAL QUIET)
  find_package(PCL 1.2 REQUIRED)
  include_directories(${PCL_INCLUDE_DIRS})
  link_directories(${PCL_LIBRARY_DIRS})
  add_definitions(${PCL_DEFINITIONS})
  add_executable (PC_Svr2 cloud_viewer.cpp)
  target_link_libraries(PC_Svr2 CGAL::CGAL ${PCL_LIBRARIES})
  </code></pre>
  
  <p>Does anyone know what the problem might be?</p>