Ask Your Question
0

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

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

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:

Stacktrace:

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

at VideoCap.main(MyVideoCap.java:7)

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

Comments

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 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

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

rafaoc gravatar image

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

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 opencv.so for linux. Select the parameter and click on Edit

image description

edit flag offensive delete link more

Question Tools

Stats

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

Seen: 4,531 times

Last updated: Oct 22 '14