-1

I have an application that builds fine with OpenCV 3 Beta. I just downloaded and tried to use OpenCV 3 RC1, and now I am getting the following linker error:

Error   1   error LNK2019: unresolved external symbol "int __cdecl cv::hal::normHamming(unsigned char const *,int)" (?normHamming@hal@cv@@YAHPEBEH@Z) referenced in function "double __cdecl cv::norm(class cv::_InputArray const &,int,class cv::_InputArray const &)" (?norm@cv@@YANAEBV_InputArray@1@H0@Z))

I know what this error means and how to link to libraries, but I'm not sure what libraries I need to change to match the upgrade. What changed between OpenCV 3 Beta and RC1 that broke my application, and how can I fix it?

Jason C
  • 38,729
  • 14
  • 126
  • 182
mans
  • 17,104
  • 45
  • 172
  • 321
  • 2
    possible duplicate of [What is an undefined reference/unresolved external symbol error and how do I fix it?](http://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix) – Mateusz Grzejek Apr 27 '15 at 14:49
  • You probably don't link the libraries. Howtos for various OS/compilers can be found here: http://docs.opencv.org/3.0-last-rst/doc/tutorials/introduction/table_of_content_introduction/table_of_content_introduction.html#table-of-content-introduction – nils Apr 27 '15 at 14:58
  • 1
    @MateuszGrzejek Thanks for the suggestion, but my problem is not about linker problem, but I am just asking if there is any specific reason that OpenCV3 beta and OpenCv 3 RC1 are different? My application works well with OpenCv 3 beta but not OpenCv 3 RC1 – mans Apr 27 '15 at 14:59
  • 1
    @nils My application works fine with OpenCV 3 Beta so I think I added all libraries corectly. It is not working with OpenCV 3 RC1 – mans Apr 27 '15 at 15:00
  • 1
    Oh, ok. Then I think @berak hit the nail quite well: https://github.com/Itseez/opencv/blob/063e4004ba0c103318aaf96c48eee6217865db9a/modules/hal/include/opencv2/hal.hpp – nils Apr 27 '15 at 15:06
  • 1
    @JasonC Yes, it does. It is a problem with missing dependency and fact, that the OP don't track changes between different versions of OpenCV. He `just downlod and tried to use`, but didn't bother to check if they are compatible? Come on... – Mateusz Grzejek Apr 27 '15 at 15:24

1 Answers1

5

there was an additional 'hal' module added a couple of days before (all the sse/avx/neon optimizations go into their own module now), so you will have to add 'opencv_hal300.lib' to your libraries list

berak
  • 39,159
  • 9
  • 91
  • 89