xtaci / algorithms

Algorithms & Data structures in C++.
MIT License
5.28k stars 1.52k forks source link

build failed on Ubuntu #69

Open lunalunaa opened 7 years ago

lunalunaa commented 7 years ago

Error message is like following.

c++: error: /FImsvc/alg_vs.h: 没有那个文件或目录
CMakeFiles/astar_demo.dir/build.make:62: recipe for target 'CMakeFiles/astar_demo.dir/src/astar_demo.cpp.o' failed
make[3]: *** [CMakeFiles/astar_demo.dir/src/astar_demo.cpp.o] Error 1
CMakeFiles/Makefile2:992: recipe for target 'CMakeFiles/astar_demo.dir/all' failed
make[2]: *** [CMakeFiles/astar_demo.dir/all] Error 2
CMakeFiles/Makefile2:1004: recipe for target 'CMakeFiles/astar_demo.dir/rule' failed
make[1]: *** [CMakeFiles/astar_demo.dir/rule] Error 2
Makefile:443: recipe for target 'astar_demo' failed
make: *** [astar_demo] Error 2

Having looked through the CmakeList.txt, it seams that the default msvc building option is not open. So how to build on Ubuntu/Linux? I am new to Cmake, could you tell me how to fix this?

fengshuu commented 4 years ago

SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /FI\"msvc/alg_vs.h\"" ) message( ${CMAKE_CXX_FLAGS} )

把CMakeLists.txt 里面的这两句话注释了就可以了, 我也不知道是怎么回事.