Ask Your Question

parkpd's profile - activity

2014-02-10 23:09:28 -0600 commented question [compile error] in building calcOpticalFlowFarneback example

I added and compiled it in my application. what headers should I add to compile it in my project ? or I cannot use the function without NVCC ?

  • thanks in advance !
2014-02-10 04:37:19 -0600 received badge  Editor (source)
2014-02-10 04:35:05 -0600 asked a question [compile error] in building calcOpticalFlowFarneback example

Hello !

I encountered the following compile errors when build calcOpticalFlowFarneback example (farneback_optical_flow.cpp).

however I have no idea where's the errors come from. does anyone know why ?

I just guess major errors are "saturate_cast : __forceinline not permitted ~" and "C++ asm syntax ignored ~", and something might not be included in the project.

  • with opencv 2.4.8, VS 2012

thanks in advance !

Best Regards, yeonchool

the errors >

d:#home#project\denseopticalflow\denseopticalflow\opencv2.4.8\include\opencv2\gpu\device\saturate_cast.hpp(54): error C2065: 'uint' : undeclared identifier 1>d:#home#project\denseopticalflow\denseopticalflow\opencv2.4.8\include\opencv2\gpu\device\saturate_cast.hpp(54): error C2146: syntax error : missing ')' before identifier 'v' 1>d:#home#project\denseopticalflow\denseopticalflow\opencv2.4.8\include\opencv2\gpu\device\saturate_cast.hpp(54): error C2433: 'saturate_cast' : '__forceinline' not permitted on data declarations 1>d:#home#project\denseopticalflow\denseopticalflow\opencv2.4.8\include\opencv2\gpu\device\saturate_cast.hpp(54): error C2365: 'cv::gpu::device::saturate_cast' : redefinition; previous definition was 'function' 1>d:#home#project\denseopticalflow\denseopticalflow\opencv2.4.8\include\opencv2\gpu\device\saturate_cast.hpp(54): error C2059: syntax error : ')' 1>d:#home#project\denseopticalflow\denseopticalflow\opencv2.4.8\include\opencv2\gpu\device\saturate_cast.hpp(55): error C2143: syntax error : missing ';' before '{' 1>d:#home#project\denseopticalflow\denseopticalflow\opencv2.4.8\include\opencv2\gpu\device\saturate_cast.hpp(55): error C2447: '{' : missing function header (old-style formal list?) 1>d:#home#project\denseopticalflow\denseopticalflow\opencv2.4.8\include\opencv2\gpu\device\saturate_cast.hpp(61): error C2065: 'uint' : undeclared identifier 1>d:#home#project\denseopticalflow\denseopticalflow\opencv2.4.8\include\opencv2\gpu\device\saturate_cast.hpp(61): error C2146: syntax error : missing ';' before identifier 'res' 1>d:#home#project\denseopticalflow\denseopticalflow\opencv2.4.8\include\opencv2\gpu\device\saturate_cast.hpp(61): error C2065: 'res' : undeclared identifier 1>d:#home#project\denseopticalflow\denseopticalflow\opencv2.4.8\include\opencv2\gpu\device\saturate_cast.hpp(63): error C2143: syntax error : missing ')' before ':' 1>d:#home#project\denseopticalflow\denseopticalflow\opencv2.4.8\include\opencv2\gpu\device\saturate_cast.hpp(63): error C2290: C++ 'asm' syntax ignored. Use __asm. 1>d:#home#project\denseopticalflow\denseopticalflow\opencv2.4.8\include\opencv2\gpu\device\saturate_cast.hpp(63): error C2059: syntax error : ')' 1>d:#home#project\denseopticalflow\denseopticalflow\opencv2.4.8\include\opencv2\gpu\device\saturate_cast.hpp(64): error C2065: 'res' : undeclared identifier 1>d:#home#project\denseopticalflow\denseopticalflow\opencv2.4.8\include\opencv2\gpu\device\saturate_cast.hpp(68): error C2065: 'uint' : undeclared identifier 1>d:#home#project\denseopticalflow\denseopticalflow\opencv2.4.8\include\opencv2\gpu\device\saturate_cast.hpp(68): error C2146: syntax error : missing ';' before identifier 'res' 1>d:#home#project\denseopticalflow\denseopticalflow\opencv2.4.8\include\opencv2\gpu\device\saturate_cast.hpp(68): error C2065: 'res' : undeclared identifier 1>d:#home#project\denseopticalflow\denseopticalflow\opencv2.4.8\include\opencv2\gpu\device\saturate_cast.hpp(69): error C2143: syntax error : missing ')' before ':' 1>d:#home#project\denseopticalflow\denseopticalflow\opencv2.4.8\include\opencv2\gpu\device\saturate_cast.hpp(69): error C2290: C++ 'asm' syntax ignored. Use __asm. 1>d:#home#project\denseopticalflow\denseopticalflow ... (more)