Ask Your Question

NATIVE_LIBRARY_NAME cannot be resolved or is not a field with Linux + Eclipse + Java

asked 2014-08-19 00:28:57 -0500

gopal ahir gravatar image

Confused about my git opencv-2.4.5 Updating to "Core.NATIVE_LIBRARY_NAME" from the newer tutorial and giving the library setup my best shot (opencvbuildpath/lib), I get an error on Core.NATIVE_LIBRARY_NAME like so:


Exception in thread "main" java.lang.Error: Unresolved compilation problem: 
![NATIVE_LIBRARY_NAME cannot be resolved or is not a field]

at VideoCap.main(

I had settled the NativLibrary path at the following location. /home/.../OpenCV/opencv-2.4.5/build/lib

image description

edit retag flag offensive close merge delete


Hi Buddy, I met the same problem there. Would please tell me how to solve this problem. Thank U so much!!!!!!!

Tysonyin88 gravatar imageTysonyin88 ( 2016-06-18 16:07:23 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2014-10-22 00:39:05 -0500

rafaoc gravatar image

updated 2014-10-22 00:39:49 -0500

You have to include the library into the project path:
Project > Properties > Java Build Path > Libraries > add JARs / Add external JARs > select the opencv-XX.jar file
add JARs if you have the .jar file into the folder project. Otherwise use addd external JARs

Later, you have to modify the parameter 'Native library location' with the folder path where is the opencv library: either opencv.dll for windows or for linux. Select the parameter and click on Edit

image description

edit flag offensive delete link more

Question Tools


Asked: 2014-08-19 00:28:57 -0500

Seen: 4,330 times

Last updated: Oct 22 '14