Issue #140 new

undefined reference to `Classifier::Classify()...'

Anonymous created an issue

Hi, I tried to compile test time code and I got an error.

Things went well when I compiled the CPU-only code. It seemed well while running the command line: cmake -D CMAKE_BUILD_TYPE=RelWithDebInfo .

, and I got the following information(Ubuntu version is 16.04):

-- Using xxx-Ubuntu compilation options -- Found CUDA: /usr/local/cuda-8.0 (found version "8.0") -- Boost version: 1.58.0 -- Found the following Boost libraries: -- program_options -- filesystem -- system -- thread -- chrono -- date_time -- atomic -- Found CUDA: /usr/local/cuda-8.0 (found suitable version "8.0", minimum required is "4.0") -- Configuring done -- Generating done -- Build files have been written to: /home/xxx/doppia/src/applications/objects_detection

When I type 'make -j2' in terminal, it seemed finished running(100%). However, the following error occurred:

[100%] Linking CXX executable objects_detection libcpp_stuff_library.a(GpuVeryFastIntegralChannelsDetector.cpp.o): In function doppia::GpuVeryFastIntegralChannelsDetector::compute_v2()': /home/xxx/doppia/src/objects_detection/GpuVeryFastIntegralChannelsDetector.cpp:875: undefined reference toClassifier::Classifyabi:cxx11' /home/xxx/doppia/src/objects_detection/GpuVeryFastIntegralChannelsDetector.cpp:882: undefined reference to Classifier::Classify[abi:cxx11](cv::Mat const&, int)' libcpp_stuff_library.a(GpuVeryFastIntegralChannelsDetector.cpp.o): In functiondoppia::GpuVeryFastIntegralChannelsDetector::GpuVeryFastIntegralChannelsDetector(boost::program_options::variables_map const&, boost::shared_ptr<doppia::MultiScalesIntegralChannelsModel>, boost::shared_ptr<doppia::AbstractNonMaximalSuppression>, float, int)': /home/xxx/doppia/src/objects_detection/GpuVeryFastIntegralChannelsDetector.cpp:40: undefined reference to Classifier::Classifier()' /home/xxx/doppia/src/objects_detection/GpuVeryFastIntegralChannelsDetector.cpp:48: undefined reference toClassifier::Classifier(std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /home/xxx/doppia/src/objects_detection/GpuVeryFastIntegralChannelsDetector.cpp:56: undefined reference to Classifier::Classifier(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /home/xxx/doppia/src/objects_detection/GpuVeryFastIntegralChannelsDetector.cpp:64: undefined reference toClassifier::Classifier(std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /home/xxx/doppia/src/objects_detection/GpuVeryFastIntegralChannelsDetector.cpp:72: undefined reference to Classifier::initial(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' libcpp_stuff_library.a(GpuVeryFastIntegralChannelsDetector.cpp.o): In functiondoppia::GpuVeryFastIntegralChannelsDetector::GpuVeryFastIntegralChannelsDetector(boost::program_options::variables_map const&, boost::shared_ptr<doppia::MultiScalesIntegralChannelsModel>, boost::shared_ptr<doppia::AbstractNonMaximalSuppression>, float, int)': /home/xxx/doppia/src/objects_detection/GpuVeryFastIntegralChannelsDetector.cpp:40: undefined reference to Classifier::Classifier()' /home/xxx/doppia/src/objects_detection/GpuVeryFastIntegralChannelsDetector.cpp:48: undefined reference toClassifier::Classifier(std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /home/xxx/doppia/src/objects_detection/GpuVeryFastIntegralChannelsDetector.cpp:56: undefined reference to Classifier::Classifier(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /home/xxx/doppia/src/objects_detection/GpuVeryFastIntegralChannelsDetector.cpp:64: undefined reference toClassifier::Classifier(std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /home/xxx/doppia/src/objects_detection/GpuVeryFastIntegralChannelsDetector.cpp:72: undefined reference to `Classifier::initial(std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' collect2: error: ld returned 1 exit status CMakeFiles/objects_detection.dir/build.make:108: recipe for target 'objects_detection' failed make[2]: [objects_detection] Error 1 CMakeFiles/Makefile2:142: recipe for target 'CMakeFiles/objects_detection.dir/all' failed make[1]: [CMakeFiles/objects_detection.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

I tried to solve the problem with adding '#include "cnn/classification.h"' into gpuveryfastintegralchannelsdetector.hpp, but the error still exists.

Could someone give me some help or advise? I'm a newbie in doppia and CUDA.

Comments (3)

  1. oohye

    Not yet... Is it because of the Ubuntu version? According to my experience, it worked out when I ran objects_detection by the 14.04 version of Ubuntu with CPU. On the other hand, it still threw the same error by using CPU in 16.04 Ubuntu environment. However, I haven't tried the GPU in 14.04 Ubuntu yet.

  2. Log in to comment