Skip to content

Cannot compile ch12, dnn linking error? #2

Description

@TensorFlowing

OpenCV 4.0.0, installed from source. Able to build/run the samples in other chapters without DNN module.

CMakeFiles/DeepLearning_ch12.dir/main.cpp.o: In function main': main.cpp:(.text+0x177): undefined reference to cv::dnn::dnn4_v20180917::readNetFromDarknet(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
main.cpp:(.text+0x18b): undefined reference to `cv::dnn::dnn4_v20180917::Net::~Net()'
collect2: error: ld returned 1 exit status
CMakeFiles/DeepLearning_ch12.dir/build.make:102: recipe for target 'DeepLearning_ch12' failed
make[2]: *** [DeepLearning_ch12] Error 1
CMakeFiles/Makefile2:94: recipe for target 'CMakeFiles/DeepLearning_ch12.dir/all' failed
make[1]: *** [CMakeFiles/DeepLearning_ch12.dir/all] Error 2
Makefile:102: recipe for target 'all' failed
make: *** [all] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions