Error while loading library
10 views (last 30 days)
Show older comments
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 Comments
Walter Roberson
on 7 Jun 2018
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.)
Answers (1)
See Also
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!