libfreenect错误:“查找函数'freenect_set_depth_format'时出错:libfreenect.so”

时间:2011-12-08 13:57:51

标签: java jna kinect

在为Java JNA Wrapper制作libfreenect时出现以下错误:

-------------------------------------------------------------------------------
Test set: org.openkinect.freenect.FreenectTest
-------------------------------------------------------------------------------
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.138 sec <<< FAILURE!
org.openkinect.freenect.FreenectTest  Time elapsed: 0 sec  <<< ERROR!
java.lang.UnsatisfiedLinkError: Error looking up function 'freenect_set_depth_format':
/home/richard/libfreenect/wrappers/java/../../build/lib/libfreenect.so: 
undefined symbol: freenect_set_depth_format

我正在使用Xubuntu 11.10 Ubuntu Manual Install使用freeglut3-dev而不是libglut3-dev工作正常。我能够成功运行glview。

是否有其他人遇到此错误?

有没有人能够解决此错误?

1 个答案:

答案 0 :(得分:1)

我在网络上发现了这一点,在页面的最后一篇文章中,用户提到他能够找到解决方案。我希望它有所帮助。

来自https://github.com/OpenKinect/libfreenect/issues/239

第190行改变

freenect_set_depth_format(this, fmt.intValue());freenect_set_depth_mode(this, fmt.intValue());

freenect_set_video_format(this, fmt.intValue());freenect_set_video_mode(this, fmt.intValue());

并在最后更改

private static native int freenect_set_depth_format(NativeDevice dev, int i);private static native int freenect_set_depth_mode(NativeDevice dev, int i);

private static native int freenect_set_video_format(NativeDevice dev, int i);private static native int freenect_set_video_mode(NativeDevice dev, int i);