Load Library error Matlab

两盒软妹~` 提交于 2019-12-01 08:19:38

问题


I intend to work with OpenCV 1.1 version and Matlab2011 together. The program uses call to load library. However, it returns an error

 > In loadlibrary at 347
  In Untitled at 4 
Error using loadlibrary (line 421)
There was an error loading the library "C:\Program Files
(x86)\OpenCV1.1\bin\cxcore110.dll"
C:\Program Files (x86)\OpenCV1.1\bin\cxcore110.dll is not a valid
Win32 application.

I have tested the program in Matlab 2008 and 2010 where it gives error of a different kind I have installed x64 Compilers and Tools and my system has Visual Studio2008 and 2010 with SDK7 and 6.1. Also, on doing MEX setup I get the following options Select a compiler:

[1] Microsoft Software Development Kit (SDK) 7.1 in c:\Program Files (x86)\Microsoft Visual Studio 10.0 
[2] Microsoft Visual C++ 2010 Express in c:\Program Files (x86)\Microsoft Visual Studio 10.0 

[0] None 

Compiler: 2

This also returns the error

Error in ==> untitled at 5
loadlibrary(...

I am perplexed at what to do as this problem is persistently appearing. I even followed the thread in link where tit mentions that 2011 supports load library. So,why does it not work?Please help.


回答1:


Applications compiled for 32bits don't mix with applications compiled for 64bits. If your OpenCV was compiled for 32bits, make sure Matlab is 32bits as well as your compilers.

BTW, seriously consider moving to a more recent version. OpenCV 1.1 is jurassic!



来源:https://stackoverflow.com/questions/9475963/load-library-error-matlab

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!