harryhan618 / SCNN_Pytorch

Pytorch implementation of "Spatial As Deep: Spatial CNN for Traffic Scene Understanding"
MIT License
250 stars 68 forks source link

About evaluation #65

Open chenyiman opened 2 years ago

chenyiman commented 2 years ago

when I run "make", I met the following problem:

Scanning dependencies of target evaluate [ 20%] Building CXX object CMakeFiles/evaluate.dir/src/evaluate.cpp.o [ 40%] Building CXX object CMakeFiles/evaluate.dir/src/counter.cpp.o [ 60%] Building CXX object CMakeFiles/evaluate.dir/src/lane_compare.cpp.o [ 80%] Building CXX object CMakeFiles/evaluate.dir/src/spline.cpp.o [100%] Linking CXX executable ../evaluate /lib/x86_64-linux-gnu/libm.so.6: undefined reference to `__strtof128_nan@GLIBC_PRIVATE' collect2: error: ld returned 1 exit status CMakeFiles/evaluate.dir/build.make:190: recipe for target '../evaluate' failed make[2]: [../evaluate] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/evaluate.dir/all' failed make[1]: [CMakeFiles/evaluate.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

The same problem as: https://stackoverflow.com/questions/68480926/lib-x86-64-linux-gnu-libm-so-6-undefined-reference-to-strtof128-nanglibc-p

Can you help me? Thanks!

miaaaaaaaaaaaaaaaaaaaaaaa commented 2 years ago

add set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=0") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread") to "utils/lane_evaluation/CULane/CMakeLists.txt"

chenyiman commented 2 years ago

add set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=0") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread") to "utils/lane_evaluation/CULane/CMakeLists.txt"

Thanks for your reply! But it doesn't work : [ 20%] Building CXX object CMakeFiles/evaluate.dir/src/evaluate.cpp.o [ 40%] Building CXX object CMakeFiles/evaluate.dir/src/counter.cpp.o [ 60%] Building CXX object CMakeFiles/evaluate.dir/src/lanecompare.cpp.o [ 80%] Building CXX object CMakeFiles/evaluate.dir/src/spline.cpp.o [100%] Linking CXX executable ../evaluate CMakeFiles/evaluate.dir/src/evaluate.cpp.o: In function visualize(std::string&, std::vector<std::vector<cv::Point, std::allocator<cv::Point > >, std::allocator<std::vector<cv::Point, std::allocator<cv::Point > > > >&, std::vector<std::vector<cv::Point, std::allocator<cv::Point > >, std::allocator<std::vector<cv::Point, std::allocator<cv::Point_ > > > >&, std::vector<int, std::allocator >, int)': evaluate.cpp:(.text+0x10cf): undefined reference to cv::imread(std::string const&, int)' evaluate.cpp:(.text+0x10ea): undefined reference to cv::imread(std::string const&, int)' evaluate.cpp:(.text+0x1859): undefined reference to cv::namedWindow(std::string const&, int)' evaluate.cpp:(.text+0x18d3): undefined reference to cv::imshow(std::string const&, cv::_InputArray const&)' evaluate.cpp:(.text+0x192f): undefined reference to cv::namedWindow(std::string const&, int)' evaluate.cpp:(.text+0x19a6): undefined reference to cv::imshow(std::string const&, cv::_InputArray const&)' /lib/x86_64-linux-gnu/libm.so.6: undefined reference to __strtof128_nan@GLIBC_PRIVATE' collect2: error: ld returned 1 exit status CMakeFiles/evaluate.dir/build.make:190: recipe for target '../evaluate' failed make[2]: [../evaluate] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/evaluate.dir/all' failed make[1]: [CMakeFiles/evaluate.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

Where should I add them in the CMakeLists.txt?