Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About evaluation #65

Open
chenyiman opened this issue Feb 13, 2022 · 2 comments
Open

About evaluation #65

chenyiman opened this issue Feb 13, 2022 · 2 comments

Comments

@chenyiman
Copy link

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

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
Copy link
Author

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/lane_compare.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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants