2
$\begingroup$

I am trying to set up a MATlink using the instructions given here. I get an error while running the following commands

Needs["MATLink`"]
OpenMATLAB[]

Error:

The procedure entry point gzdirect could not be located in the dynamic
link library C:\Program Files\MATLAB\R2019b\bin\win64\libxml2.dll

Could someone suggest how this can be resolved?

EDIT: As suggested in the comment, I am also providing the output of

MATLinkDeveloperGetInfo[]

MATLink 1.1 for Windows (Fri 15 Aug 2014)

9.0 for Microsoft Windows (64-bit) (January 25, 2013)

Force 32-bit engine: False

System PATH:
C:\Program Files\Wolfram Research\Mathematica\9.0\SystemFiles\Kernel\Binaries\Windows-x86-64
C:\Program Files\Wolfram Research\Mathematica\9.0
C:\Program Files\Wolfram Research\Mathematica\9.0\SystemFiles\FrontEnd\Binaries\Windows-x86-64
C:\Program Files\Wolfram Research\Mathematica\9.0\SystemFiles\Kernel\Binaries\Windows-x86-64
C:\Program Files (x86)\Cuminas\Document Express DjVu Plug-in\
C:\Program Files (x86)\Intel\iCLS Client\
C:\Program Files\Intel\iCLS Client\
C:\windows\system32
C:\windows
C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL
C:\Program Files\Intel\Intel(R) Management Engine Components\DAL
C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT
C:\Program Files\Intel\Intel(R) Management Engine Components\IPT
C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
C:\Users\yale\.dnx\bin
C:\Program Files\Microsoft DNX\Dnvm\
C:\Program Files\Microsoft SQL Server\130\Tools\Binn\
C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\
C:\Program Files\MATLAB\R2019b\runtime\win64
C:\Program Files\MATLAB\R2019b\bin
C:\WINDOWS\system32
C:\WINDOWS
C:\Program Files\Intel\WiFi\bin\
C:\Program Files\Common Files\Intel\WirelessCommon\
C:\Program Files\MATLAB\R2019b\bin\win64
%USERPROFILE%\AppData\Local\Microsoft\WindowsApps


COM server information:
CLSID: {0818548B-86E8-4451-87C2-AB70D68C490A}
Program ID: Matlab.Application (Version 9.7)
Command: C:\Program Files\MATLAB\R2019b\bin\win64\MATLAB.exe /MLAutomation
$\endgroup$
7
  • $\begingroup$ As mentioned in the troubleshooting notes, it is critical that you include the output of MATLink`Developer`GetInfo[] , otherwise we cannot guess at the cause of the problem. When you say "the instructions given here", did you forget to include a link to the instructions? $\endgroup$
    – Szabolcs
    Jan 2, 2020 at 13:08
  • $\begingroup$ @Szabolcs Please find the updated post $\endgroup$
    – Natasha
    Jan 2, 2020 at 13:22
  • $\begingroup$ Please evaluate SystemOpen@FileNameJoin[{DirectoryName@FindFile["MATLink`"], "..","Engine", "bin", "Windows64"}]. It will open a directory containing mengine.exe. Run this program manually (double-click it). What happens? You should get a small window asking to "Create link" with OK and Cancel buttons (you can just cancel). $\endgroup$
    – Szabolcs
    Jan 2, 2020 at 14:24
  • $\begingroup$ @Szabolcs yes, I get the small window with "Create link". Clicked cancel . Then I get another small window, clicked cancel for this one too. How should I proceed next? Please let me know $\endgroup$
    – Natasha
    Jan 2, 2020 at 15:35
  • $\begingroup$ Can you restart Mathematica completely and try again? $\endgroup$
    – Szabolcs
    Jan 2, 2020 at 18:32

1 Answer 1

2
$\begingroup$

The cause is that the "../libxml2.dll" file in other directory is used instead of MATLAB installation directory. The solution is adding or moving the MATLAB installation directory at the start of the system path. As for me, here is the start of my system path. After adding the path, please restart the Mathematica and run the commands again.

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.