Error at calling *.dll file in Matlab
이전 댓글 표시
Hi,
I want to use icp.dll file in Matlab for a project. When I use my friend's laptop, which is 32 bit win7, Matlab 2009a. Matlab automatically recognize icp.dll and works fine. But, when I use my computer, 64 bit win7 Matlab 2011a, Matlab shows an error below.
=== error =====
loadlibrary('icp.dll','icp.h')
??? Error using ==> loadlibrary at 441
Failed to preprocess the input file.
Output from preprocessor is:icp.h
C:\matlab\test\icp.h(329) : error C2006:
'#include' : expected a filename, found 'identifier'
C:\matlab\test\icp.h(329) : fatal error
C1083: Cannot open include file: '': No such file or directory
=== error =====
Actually I don't have icp.h file, I only have icp.dll file. I really want to compile icp.dll file in MATLAB.
I hope you guys have an answer.
Thank you
[Merged information from duplicate question]
Hi,
I have icp.dll file, which works fine in 32bit win7 and Matlab 2009b, while it shows an error in 64bit Matlab 2011a.
===error====
??? Undefined function or method 'icp' for input arguments of type 'double'.
Error in ==> practice_ICP_NDT_01 at 87
delta = icp(p1, p2icp, delta, GATE1, NIT, INTERP)
===error====
Matlab seems not to recognize the icp.dll file so I commanded that
>> loadlibrary('icp.dll')
??? Error using ==> loadlibrary>lFullPath at 613
Could not find file icp.h.
Error in ==> loadlibrary at 226
header=lFullPath(header);
>> calllib('icp.dll')
??? Error using ==> calllib
To call a function both the library name and function name are needed.
I don't know how I can solve this problem and use icp.dll in Matlab Thanks.
댓글 수: 2
Kaustubha Govind
2012년 5월 7일
The LOADLIBRARY command needs either a header or generated prototype file (.m) corresponding to the DLL. If you don't have icp.h, how did you load it on your friend's machine?
Also, note that you will need 32-bit MATLAB to load a 32-bit DLL.
Walter Roberson
2012년 5월 7일
Your duplicate question has been merged into the above. You may wish to review it and edit out any redundant information.
채택된 답변
추가 답변 (3개)
Ray
2015년 12월 10일
1 개 추천
I am wondering how do you fix this problem, by installing a 32 bit Matlab or other methods. Because I only have the .dll file without the .h file, and in the similar situation like yours.
Look forward to your reply
Walter Roberson
2012년 5월 6일
Windows does not know the character "~" as a directory name: that character is used by the Unix (Linux, OS-X) shells to mean "the user's home directory". You need to track down where that "~" is coming from: did you
cd ~
for example? Or is there an icp.h file that has a #include statement that uses it?
Walter Roberson
2012년 5월 7일
0 개 추천
Is icp.dll a product of the company Softlog ? If so then the software was strictly 32 bit and cannot be used from the 64 bit version of MATLAB.
카테고리
도움말 센터 및 File Exchange에서 MATLAB Compiler에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!