Error while loading library

9 visualizzazioni (ultimi 30 giorni)
cayetano santos
cayetano santos il 7 Giu 2018
Modificato: cayetano santos il 12 Giu 2018
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 Commenti
cayetano santos
cayetano santos il 7 Giu 2018
Nothing
Walter Roberson
Walter Roberson il 7 Giu 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.)

Accedi per commentare.

Risposte (1)

cayetano santos
cayetano santos il 12 Giu 2018
Modificato: cayetano santos il 12 Giu 2018
I just installed perl as requested. Now I get
>> perl desktop.ini
Error using perl (line 86)
System error: Command executed: set PATH=C:\MATLAB\R2018a\sys\perl\win32\bin\;
As for this answer I have updated file perl.m at line 80 from
perlInst = fullfile(matlabroot, 'sys\perl\win32\bin\');
to
perlInst = 'C:\Perl64\bin\';
This seems to fix the problem. I wonder however if there is no a more elegant way to solve the problem, first, and why this happens then: this is the first matlab install where I observe this issue.
Thanks for your help

Categorie

Scopri di più su Introduction to Installation and Licensing in Help Center e File Exchange

Prodotti

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by