# Lots of errors from 'imgproc.hpp' when trying to build. (OpenCV 4.9.0)

**URL:** <https://forum.opencv.org/t/lots-of-errors-from-imgproc-hpp-when-trying-to-build-opencv-4-9-0/17905>\
**Category:** C++\
**Tags:** build\
**Created:** [June 10, 2024, 7:18pm UTC](https://forum.opencv.org/t/lots-of-errors-from-imgproc-hpp-when-trying-to-build-opencv-4-9-0/17905 "2024-06-10T19:18:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![presli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/presli/32/10616_2.png) [@presli](https://forum.opencv.org/u/presli)\
**Post date:** [June 10, 2024, 7:18pm UTC](https://forum.opencv.org/t/lots-of-errors-from-imgproc-hpp-when-trying-to-build-opencv-4-9-0/17905/1 "2024-06-10T19:18:38Z")

</div>

1\>main.cpp  
1\>C:\opencv\build\include\opencv2\imgproc.hpp(4956,27): error C2589: ‘(’: illegal token on right side of ‘::’  
1\>C:\opencv\build\include\opencv2\imgproc.hpp(4956,22): error C2144: syntax error: ‘unknown-type’ should be preceded by ‘)’  
1\>C:\opencv\build\include\opencv2\imgproc.hpp(4956,9): error C2660: ‘cv::LineIterator::init’: function does not take 2 arguments  
1\>C:\opencv\build\include\opencv2\imgproc.hpp(4956,22): error C2144: syntax error: ‘unknown-type’ should be preceded by ‘;’  
1\>C:\opencv\build\include\opencv2\imgproc.hpp(4956,27): error C2143: syntax error: missing ‘)’ before ‘.’  
1\>C:\opencv\build\include\opencv2\imgproc.hpp(4956,27): error C3928: ‘-\>’: trailing return type is not allowed after a parenthesized declarator  
1\>C:\opencv\build\include\opencv2\imgproc.hpp(4956,27): error C3484: syntax error: expected ‘-\>’ before the return type  
1\>C:\opencv\build\include\opencv2\imgproc.hpp(4956,27): error C3613: missing return type after ‘-\>’ (‘int’ assumed)  
1\>C:\opencv\build\include\opencv2\imgproc.hpp(4956,27): error C2082: redefinition of formal parameter ‘pt1’  
1\>C:\opencv\build\include\opencv2\imgproc.hpp(4956,27): error C2146: syntax error: missing ‘;’ before identifier ‘x’  
1\>C:\opencv\build\include\opencv2\imgproc.hpp(4956,27): error C2059: syntax error: ‘)’  
1\>C:\opencv\build\include\opencv2\imgproc.hpp(4956,27): error C2065: ‘x’: undeclared identifier  
1\>C:\opencv\build\include\opencv2\imgproc.hpp(4957,27): error C2589: ‘(’: illegal token on right side of ‘::’  
1\>C:\opencv\build\include\opencv2\imgproc.hpp(4957,22): error C2062: type ‘unknown-type’ unexpected  
1\>C:\opencv\build\include\opencv2\imgproc.hpp(4957,27): error C2059: syntax error: ‘)’  
1\>C:\opencv\build\include\opencv2\imgproc.hpp(4958,27): error C2589: ‘(’: illegal token on right side of ‘::’  
1\>C:\opencv\build\include\opencv2\imgproc.hpp(4958,27): error C2059: syntax error: ‘)’  
1\>C:\opencv\build\include\opencv2\imgproc.hpp(4958,52): error C2589: ‘(’: illegal token on right side of ‘::’  
1\>C:\opencv\build\include\opencv2\imgproc.hpp(4958,52): error C2059: syntax error: ‘)’  
1\>C:\opencv\build\include\opencv2\imgproc.hpp(4959,27): error C2589: ‘(’: illegal token on right side of ‘::’  
1\>C:\opencv\build\include\opencv2\imgproc.hpp(4959,27): error C2059: syntax error: ‘)’  
1\>C:\opencv\build\include\opencv2\imgproc.hpp(4959,52): error C2589: ‘(’: illegal token on right side of ‘::’  
1\>C:\opencv\build\include\opencv2\imgproc.hpp(4959,52): error C2059: syntax error: ‘)’  
1\>C:\opencv\build\include\opencv2\imgproc.hpp(4959,73): error C2059: syntax error: ‘)’  
1\>C:\opencv\build\include\opencv2\imgproc.hpp(4960,49): error C2059: syntax error: ‘)’  
1\>Done building project “clrbt.vcxproj” – FAILED.

I followed a tutorial from YouTube for the setup: [https://www.youtube.com/watch?v=YUjamcyuKT4](https://www.youtube.com/watch?v=YUjamcyuKT4)

My project’s properties:  
Include directories: C:\opencv\build\include  
Library directories: C:\opencv\build\x64\vc16\lib  
Linker - Input - Additional Dependencies - opencv\_world490.lib; opencv\_world490d.lib

I also added:  
C:\opencv\build\x64\vc16\lib  
C:\opencv\build\x64\vc16\bin  
To my environmental variables’ path.
