LiangliangNan / Easy3D

A lightweight, easy-to-use, and efficient C++ library for processing and rendering 3D data
GNU General Public License v3.0
1.37k stars 245 forks source link

[HELP] - wrong compile about nanoflann package #182

Closed sli1989 closed 6 months ago

sli1989 commented 6 months ago

Describe the bug. A clear and concise description of what the bug is.

Tell us how to reproduce the bug. Is it a compile time error or runtime issue?

Development/Running environment:

Additional context.

when nmake with VS2015, there some thine wrong in 'nanoflann.hpp' and nanoflann-related files.

There seems to be no problem with program semantics, and nothing to know to fix it unless comment the nanoflann-related in cmakelist.

thanks

LiangliangNan commented 6 months ago

Did you follow the instructions of the ReadMe? Can you post the entire compiler log here?

sli1989 commented 6 months ago

Seems followed the intruction. The step for reproduction

  1. install vs_community__2015
  2. install cmake-3.29
  3. using x64 Native Tools Command Prompt
  4. cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release64 ..
  5. nmake

but reproduced in vs_community__2017, the errors C2146 and C4430 is missing with some warning information, which can be executed successfully.

And, #include <string> seems needed add in head file of \Easy3D\easy3d\util\console_style.cpp to avoid error C2679: binary '<<': no operator found.

LiangliangNan commented 6 months ago

So the error is only with vs 2015 and it works well with vs 2017? In my past test, it worked well with vs2019 and vs 2022 (but it has not been tested with vs2015 and vs2017).

Anyway, I have added #include <string> to console_style.cpp.