1

I am trying to run the OpenCV samples on Eclipse. Initially I had an error as

Program "/ndk-build.cmd" is not found in PATH

So, I changed the path in C/C++ Build to the entire path to my ndk-build.cmd instead of ${NDKROOT}/ndk-build.cmd. This seemed to work and the compiler did not show any more errors. Now, when I tried to run the program, I'm![enter image description here][1] getting many errors suddenly.

Description Resource    Path    Location    Type
'waitKey' was not declared in this scope    jni_part.cpp    /OpenCV Tutorial 2 - Mixed Processing/jni   line 19 C/C++ Problem
Function 'imread' could not be resolved jni_part.cpp    /OpenCV Tutorial 2 - Mixed Processing/jni   line 12 Semantic Error
Symbol 'endl' could not be resolved jni_part.cpp    /OpenCV Tutorial 2 - Mixed Processing/jni   line 15 Semantic Error
'imread' was not declared in this scope jni_part.cpp    /OpenCV Tutorial 2 - Mixed Processing/jni   line 12 C/C++ Problem
Symbol 'cout' could not be resolved jni_part.cpp    /OpenCV Tutorial 2 - Mixed Processing/jni   line 15 Semantic Error
'imshow' was not declared in this scope jni_part.cpp    /OpenCV Tutorial 2 - Mixed Processing/jni   line 18 C/C++ Problem
make.exe: *** [obj/local/armeabi-v7a/objs/mixed_sample/jni_part.o] Error 1  OpenCV Tutorial 2 - Mixed Processing            C/C++ Problem
Symbol 'std' could not be resolved  jni_part.cpp    /OpenCV Tutorial 2 - Mixed Processing/jni   line 9  Semantic Error
Symbol 'cv' could not be resolved   jni_part.cpp    /OpenCV Tutorial 2 - Mixed Processing/jni   line 8  Semantic Error
Type 'Mat' could not be resolved    jni_part.cpp    /OpenCV Tutorial 2 - Mixed Processing/jni   line 12 Semantic Error
Method 'empty' could not be resolved    jni_part.cpp    /OpenCV Tutorial 2 - Mixed Processing/jni   line 13 Semantic Error
Function 'waitKey' could not be resolved    jni_part.cpp    /OpenCV Tutorial 2 - Mixed Processing/jni   line 19 Semantic Error
Function 'imshow' could not be resolved jni_part.cpp    /OpenCV Tutorial 2 - Mixed Processing/jni   line 18 Semantic Error
Olli
  • 1,231
  • 15
  • 31
user3281103
  • 129
  • 12
  • Means it cant find any of those. Did you import the right headers? (and the right path to those headers) – Tim Feb 06 '14 at 21:32
  • I think I have imported the headers. This is a sample file out of OpenCV. Can you tell me what is actually wrong with this? I have been stuck with this for 2 days! – user3281103 Feb 06 '14 at 21:35
  • You program doesnt recognize 'waitkey' 'imread' 'endl' etc, these are probably defined in a file you should have imported. There are dozens of hits on google that can tell you the exact cause and solution to these kind of problems ;-) – Tim Feb 06 '14 at 21:40
  • These messages come from Eclipse, or from the build? Try to delete all messages in the "Problems" tab, and disable "Code Analysis" (see http://stackoverflow.com/a/16891713/192373). – Alex Cohn Feb 07 '14 at 07:13
  • Hi. I tried that. but I still get errors 'waitKey' was not declared in this scope jni_part.cpp /OpenCV Tutorial 2 - Mixed Processing/jni line 19 C/C++ Problem 'imshow' was not declared in this scope jni_part.cpp /OpenCV Tutorial 2 - Mixed Processing/jni line 18 C/C++ Problem 'imread' was not declared in this scope jni_part.cpp /OpenCV Tutorial 2 - Mixed Processing/jni line 12 C/C++ Problem – user3281103 Feb 09 '14 at 22:57

0 Answers0