After 2.4.12.3 Windows Build from source - Java Unsatisfied Link Error

asked 2015-11-20 09:54:18 -0600

Hi,

I downloaded 2.4.12.3 source from github and build it on Ubuntu 14.04 64 bit and Windows 7 64 bit.

At linux side it is working and i saw that the problem of rendering H.264 video stream at high resolutions like 1920x1080 was solved. (Code change was : FFMPEG & GSTREAMER decoding through getting the frame with underlaying protocol TCP and null frame control)

But at Windows side although the build is okay on Visual Studio 2013 and the INSTALL project output seems true like below (i compared the folder structure with 2.4.9's and 2.4.11's sourceforge.net binary windows distributions), it gives always "Java Unsatisfied link error : opencv_java2412.dll can't find dependednt libraries)

image description

image description

image description

All required *.dll, *.lib files exist in bin and lib folders. I am sure about setting the -Djava.library.path as true because if you give the path wrong it gives another error like (nonative library found for opencv_2412)

So, does anybody have opinion about this situation? Did anybody try the compilation of 2.4.12.3 at Windows side?

Regards, Eray

edit retag flag offensive close merge delete

Comments

I compared the jni_part.cpp of 2.4.11.0 with 2.4.12.3 and saw that first load of library mechanism changed as below :

JNIEXPORT jint JNICALL
JNI_OnLoad(JavaVM* vm, void* )
{
    JNIEnv* env;
    if (vm->GetEnv((void**) &env, JNI_VERSION_1_6) != JNI_OK)
        return -1;

// Change starts here...
    bool init = true;
#ifdef HAVE_OPENCV_NONFREE
    init &= cv::initModule_nonfree();
#endif
#ifdef HAVE_OPENCV_FEATURES2D
    init &= cv::initModule_features2d();
#endif
#ifdef HAVE_OPENCV_VIDEO
    init &= cv::initModule_video();
#endif
#ifdef HAVE_OPENCV_ML
    init &= cv::initModule_ml();
#endif
    #ifdef HAVE_OPENCV_CONTRIB
    init &= cv::initModule_contrib();
#endif

    if(!init)
        return -1;

May be related to this. Investigation is continuing. Any help will be acceptable..:)

erohan gravatar imageerohan ( 2015-11-23 05:17:41 -0600 )edit