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

Hello, how can I solve this problem when I get multiple definitions when compiling? #3

Open
CHANdaFeng opened this issue Jun 16, 2022 · 0 comments

Comments

@CHANdaFeng
Copy link

/home/cxf/CLionProjects/CFAR/ca_cfar.cpp:8: multiple definition of CA_CFAR::getEdgeOffset(int, int, int)'; CMakeFiles/ca_cfar.dir/main.cpp.o:/home/cxf/CLionProjects/CFAR/ca_cfar.cpp:8: first defined here /usr/bin/ld: CMakeFiles/ca_cfar.dir/ca_cfar.cpp.o: in function std::vector<double, std::allocator >::vector(std::initializer_list, std::allocator const&)':
/home/cxf/CLionProjects/CFAR/ca_cfar.cpp:22: multiple definition of CA_CFAR::get_block_sum(cv::Mat&, int, int, int)'; CMakeFiles/ca_cfar.dir/main.cpp.o:/home/cxf/CLionProjects/CFAR/ca_cfar.cpp:22: first defined here /usr/bin/ld: CMakeFiles/ca_cfar.dir/ca_cfar.cpp.o: in function CA_CFAR::CA_CFAR(int, int, int, double)':
/home/cxf/CLionProjects/CFAR/ca_cfar.cpp:42: multiple definition of CA_CFAR::CA_CFAR(int, int, int, double)'; CMakeFiles/ca_cfar.dir/main.cpp.o:/home/cxf/CLionProjects/CFAR/ca_cfar.cpp:42: first defined here /usr/bin/ld: CMakeFiles/ca_cfar.dir/ca_cfar.cpp.o: in function CA_CFAR::CA_CFAR(int, int, int, double)':
/home/cxf/CLionProjects/CFAR/ca_cfar.cpp:42: multiple definition of CA_CFAR::CA_CFAR(int, int, int, double)'; CMakeFiles/ca_cfar.dir/main.cpp.o:/home/cxf/CLionProjects/CFAR/ca_cfar.cpp:42: first defined here /usr/bin/ld: CMakeFiles/ca_cfar.dir/ca_cfar.cpp.o: in function CA_CFAR::mask(cv::Mat&, cv::Mat&)':
/home/cxf/CLionProjects/CFAR/ca_cfar.cpp:49: multiple definition of CA_CFAR::mask(cv::Mat&, cv::Mat&)'; CMakeFiles/ca_cfar.dir/main.cpp.o:/home/cxf/CLionProjects/CFAR/ca_cfar.cpp:49: first defined here /usr/bin/ld: CMakeFiles/ca_cfar.dir/utils.cpp.o: in function Erosion(cv::Mat&, cv::Mat&, int)':
/home/cxf/CLionProjects/CFAR/utils.cpp:12: multiple definition of Erosion(cv::Mat&, cv::Mat&, int)'; CMakeFiles/ca_cfar.dir/main.cpp.o:/home/cxf/CLionProjects/CFAR/utils.cpp:12: first defined here /usr/bin/ld: CMakeFiles/ca_cfar.dir/utils.cpp.o: in function Dilation(cv::Mat&, cv::Mat&, int)':
/home/cxf/CLionProjects/CFAR/utils.cpp:24: multiple definition of Dilation(cv::Mat&, cv::Mat&, int)'; CMakeFiles/ca_cfar.dir/main.cpp.o:/home/cxf/CLionProjects/CFAR/utils.cpp:24: first defined here /usr/bin/ld: CMakeFiles/ca_cfar.dir/utils.cpp.o: in function build_image_array(cv::Mat&)':
/home/cxf/CLionProjects/CFAR/utils.cpp:36: multiple definition of `build_image_array(cv::Mat&)'; CMakeFiles/ca_cfar.dir/main.cpp.o:/home/cxf/CLionProjects/CFAR/utils.cpp:36: first defined here
collect2: error: ld returned 1 exit status

Hello, how can I solve this problem when I get multiple definitions when compiling?

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

1 participant