Error while loading library
10 次查看(过去 30 天)
显示 更早的评论
I am trying to load a shared library from the sample code provided in the matlab documentation. Upon MATLAB startup I just do a
addpath(fullfile(matlabroot,'extern','examples','shrlib'))
loadlibrary('shrlibsample')
I get this error
Error using loadlibrary
Call to Perl failed. Possible error processing header file.
Output of Perl command:
I am using Matlab R2018a, version 9.4.0.813654, under Windows 7. I get too
mex -setup
MEX configured to use 'MinGW64 Compiler (C)' for C language compilation
Any idea of what is going on here ?
3 个评论
Walter Roberson
2018-6-7
I wonder if perl itself is not being found?
At the MATLAB command prompt, try giving the command
perl ABC
but replace ABC will the full name of any existing text file.
If you get an error message about the perl executable not being found then you will know to install perl from http://www.cpan.org . If you get an series of error messages that look like (for example)
Error using perl (line 86)
System error: Bareword found where operator expected at tryrect.m line 2, near "y_target"
(Missing semicolon on previous line?)
then ignore the details: the important bit there is that perl itself did get successfully invoked (and tried its best to parse the arbitrary file you told it to work on.)
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
