I have compiled a C++ DLL using the MATLAB Compiler. When this DLL is called from a C/C++ client application, it works fine. However, when I try to call the Wrapper C++ via Java/JNI, I get the following error:
Error occurred during initialization of VM
Unable to load native library: The specified procedure could not be found
Stack Trace:
[0] jmi.dll:void __stdcall mwJavaAbort(void)(0x0d8319d5, 0, 1024, 0x0d831ad0) + 21 bytes
[1] jvm.dll:0x0d86b0a7(0x0d8c9420 "Unable to load native library", 0x0d71eab4 "The specified procedure could no..", 0x0d8db36c, 0)
[2] jvm.dll:0x0d86a10a(0, 3014656, 0, 0)
[3] jvm.dll:0x0d8062c1(0, 0, 0x0adf0b30, 0x0adf0b30)
[4] jvm.dll:0x0d806a4a(0x0d8925cc, 0x0d83c7a3, 12, 0x7848d050)
[5] jvm.dll:0x0d8252ca(0x0d71fe80, 0x0d83c7a3, 0x7848d050, 0x0d71fee8 " ?q\r?\n?y")
[6] jvm.dll:0x0d83c7e8(0x79cd69c8, 0x0d71fed8, 0x0d71fe80, 0x7c3536ed)
[7] jmi.dll:struct JNIEnv_ * __cdecl InitSunVM(bool)(0, 0x79ccde48 "MATLAB_JDB", 0x0d71ff10, 0) + 1390 bytes
[8] jmi.dll:bool __cdecl InitJava(void)(0x7c3536ed, 0x793f3a74, 0x7c910222, 519076) + 103 bytes
[9] jmi.dll:bool __cdecl mljInit(void)(0x0be3b2b0, 1, 0x0be3a3c0 "C:\Program Files\MATLAB\MATLAB C..", 0x7940a170) + 6 bytes
[10] mcr.dll:unsigned long __cdecl run_init_and_handle_events(void *)(519076, 0x7c910222, 15, 519076) + 54 bytes
[11] kernel32.dll:0x7c80b699(0x793feac0, 519076, 0, 0x0d722820 " *r\r")
————————————————————————
Fatal Java Exception detected at Wed Jun 10 11:07:49 2009
————————————————————————
Best Answer