Problem with MEX - perl error.
2 views (last 30 days)
Show older comments
Hi,
I would like to build dll based on my C++ code. Thus I plan to use mex in matlab. I have Visual Studio 2010 and Matlab 2013. I stack at the beginning. First I would like to configure mex and I run "mex -setup" command as a first run I received:
>> mex -setup
Can't locate auto/DynaLoader/dl_findfile.al in @INC (@INC contains: C:/Program Files/MATLAB/R2013b/sys/perl/win32/site/lib C:/Program Files/MATLAB/R2013b/sys/perl/win32/lib .) at C:/Program Files/MATLAB/R2013b/sys/perl/win32/lib/DynaLoader.pm line 194
Compilation failed in require at C:\Program Files\MATLAB\R2013b\bin\mex.pl line 127.
BEGIN failed--compilation aborted at C:\Program Files\MATLAB\R2013b\bin\mex.pl line 135.
BEGIN failed--compilation aborted at C:\Program Files\MATLAB\R2013b\bin\mex.pl line 135.
Unable to complete successfully.
I add this file from other perl installation but still have error which look like this:
>> mex -setup
Can't locate loadable object for module Win32 in @INC (@INC contains: C:/Program Files/MATLAB/R2013b/sys/perl/win32/site/lib C:/Program Files/MATLAB/R2013b/sys/perl/win32/lib .) at C:\Program Files\MATLAB\R2013b\bin\mex.pl line 127
Compilation failed in require at C:\Program Files\MATLAB\R2013b\bin\mex.pl line 127.
BEGIN failed--compilation aborted at C:\Program Files\MATLAB\R2013b\bin\mex.pl line 135.
BEGIN failed--compilation aborted at C:\Program Files\MATLAB\R2013b\bin\mex.pl line 135.
Unable to complete successfully.
I never modify this folder, win32 exists and I think that I should not change anything and this should work ?
I will be grateful for any help Bartosz
0 Comments
Answers (1)
Prasad Mendu
on 17 Oct 2016
Edited: Prasad Mendu
on 17 Oct 2016
Do you also have SDK 7.1 installed on your machine? If yes, this issue could be because of a bug described below.
There is a known bug with Microsoft Visual Studio 2010 SP1 (both Express and Professional versions) and Windows SDK 7.1. When the SDK is installed after the Visual Studio 2010 is updated to SP1, the installation removes the core compilers from the system. Microsoft has a bug report on the issue and has released a patch.
In case you want to use the Microsoft SDK 7.1 along with .NET framework 4.0 as the compiler to mex your code, refer to the link below for installation instructions:
https://www.mathworks.com/matlabcentral/answers/101105-how-do-i-install-microsoft-windows-sdk-7-1
It will be helpful to look at the troubleshooting section of the link given above if you decide to use this option.
0 Comments
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!