Error at calling *.dll file in Matlab
Show older comments
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 Comments
Kaustubha Govind
on 7 May 2012
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
on 7 May 2012
Your duplicate question has been merged into the above. You may wish to review it and edit out any redundant information.
Accepted Answer
More Answers (3)
Ray
on 10 Dec 2015
1 vote
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
on 6 May 2012
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?
1 Comment
Jong-Hwan Kim
on 6 May 2012
Walter Roberson
on 7 May 2012
0 votes
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.
Categories
Find more on MATLAB Compiler in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!