1

I have a windows 8.1 PC on a 64 bit machine. I had already installed OpenCV 3.0.0 from source without opencv_contrib. Following the answer by berak- Nonfree module is missing in OpenCV 3.0, I downloaded the contrib and tried building opencv from source again but this time with OPENCV_EXTRA_MODULES option turned on.

During this build process however, I got strange errors from the VS compiler. They were from the file

\modules\line_descriptor\src\binary_descriptor.cpp

The errors were the following on line numbers as follows.

  1. error C2143: syntax error : missing ';' before '=' E:\opencv\opencv-master\opencv_contrib-master\modules\line_descriptor\src\binary_descriptor.cpp line 833

  2. error C2059: syntax error: '>' line 836

  3. error C2143: syntax error : missing ';' before '{' E:\opencv\opencv-master\opencv_contrib-master\modules\line_descriptor\src\binary_descriptor.cpp line 837

  4. error LNK1104: cannot open file '....\lib\Debug\opencv_line_descriptor300d.lib' E:\opencv\opencv-master\build\modules\line_descriptor\LINK opencv_test_line_descriptor

  5. Error 7 error MSB3073: The command "setlocal "C:\Program Files (x86)\CMake\bin\cmake.exe" -DBUILD_TYPE=Debug -P cmake_install.cmake if %errorlevel% neq 0 goto :cmEnd :cmEnd endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone :cmErrorLevel exit /b %1 :cmDone if %errorlevel% neq 0 goto :VCEnd :VCEnd" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets 132 5 INSTALL

Community
  • 1
  • 1
Chaitanya Uttarwar
  • 318
  • 2
  • 6
  • 13
  • well, the line_descriptor module does not build for me, either. try to disable it (cmake ... -DBUILD_opencv_line_descriptor=OFF) and rerun cmake – berak Dec 11 '14 at 14:42
  • Can you tell me how to do it via the cmake-gui ? – Chaitanya Uttarwar Dec 11 '14 at 14:54
  • Okay. Got it. Can you enlist other modules that don't work? So that I can avoid building those as well. – Chaitanya Uttarwar Dec 11 '14 at 14:55
  • hmm, i'm on an outdated 32bit version, so our mileage may vary (as well as the *reasons* for something working or not). adas should be disabled (no module code there), cvv needs qt, saliency had probs here too, and i got no matlab.. – berak Dec 11 '14 at 15:11

1 Answers1

1

i had the same problem some weeks ago. i solved it this way:

edit the \modules\line_descriptor\src\binary_descriptor.cpp

and put this line after the defines:

#undef near

run cmake again (with -DBUILD_opencv_line_descriptor=ON)

what i disabled was: _cvv and _world

JonasT
  • 616
  • 2
  • 8
  • 20