фатальная ошибка LNK1215: сбой операции метаданных при включении dnn из opencv в проект c ++ на visual studio 2015 - PullRequest
0 голосов
/ 04 декабря 2018

У меня есть проект (включая подпроекты), который я хочу построить.Сначала я строю все подпроекты, в то время как я строю основной проект, я получил эту ошибку: я использую режим отладки на компьютере x64.Когда я собираю, я получаю эти ошибки (45):

MainProject.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl cv::dnn::experimental_dnn_34_v7::Layer::getMemoryShapes(class std::vector<class std::vector<int,class std::allocator<int> >,class std::allocator<class std::vector<int,class std::allocator<int> > > > const &,int,class std::vector<class std::vector<int,class std::allocator<int> >,class std::allocator<class std::vector<int,class std::allocator<int> > > > &,class std::vector<class std::vector<int,class std::allocator<int> >,class std::allocator<class std::vector<int,class std::allocator<int> > > > &)const " (?getMemoryShapes@Layer@experimental_dnn_34_v7@dnn@cv@@UEBA_NAEBV?$vector@V?$vector@HV?$allocator@H@std@@@std@@V?$allocator@V?$vector@HV?$allocator@H@std@@@std@@@2@@std@@HAEAV56@1@Z)
1>ViewersLibCore_d.lib(OpenCVViewer.obj) : error LNK2001: unresolved external symbol "public: virtual bool __cdecl 

cv::dnn::experimental_dnn_34_v7::Layer::getMemoryShapes(class std::vector<class std::vector<int,class std::allocator<int> >,class std::allocator<class std::vector<int,class std::allocator<int> > > > const &,int,class std::vector<class std::vector<int,class std::allocator<int> >,class std::allocator<class std::vector<int,class std::allocator<int> > > > &,class std::vector<class std::vector<int,class std::allocator<int> >,class std::allocator   15>LINK : fatal error LNK1215: metadata operation failed (8013119F) : 
+++
    .....

Я подозреваю, что что-то связано с библиотекой opencv_dnn, поэтому я добавляю ее в дополнительные зависимости проекта (+ путь).

Тем не менее, когда я добавляю opencv_dnn343d.lib (для режима отладки), вместо устранения ошибок я получаю эту ошибку:

    MainProject.obj : error LNK2022: metadata operation failed (8013119F) : A TypeRef exists which should, but does not, have a corresponding TypeDef: (Impl): (0x01000038).
1>LINK : fatal error LNK1215: metadata operation failed (8013119F) :

Я не могу найти способ решения этой проблемы.Есть идеи?

...