Mex file entry point is missing, path messed up in Matlab 2012a

1 次查看(过去 30 天)
FYI, I posted this question on comp.soft-sys.matlab
with Matlab 2012a, on windows 7, I noticed Matlab is going for windows files before matlab's for some commands:
EDU>> ver
Mex file entry point is missing. Please check the (case-sensitive)
spelling of mexFunction (for C MEX-files), or the (case-insensitive)
spelling of MEXFUNCTION (for FORTRAN MEX-files).
Invalid MEX-file 'C:\Windows\system32\version.dll':
so path is messed up:
EDU>> which ver
C:\Program Files (x86)\MATLAB\R2012a Student\toolbox\matlab\general\ver.m
EDU>> which input
C:\Windows\system32\input.dll
But I looked at my PATH in windows computer->Property, and I made sure Matlab is first thing. Restarted Matlab, and still the problem is there
My PATH from system:
C:\Program Files (x86)\MATLAB\R2012a Student\bin;C:\Program Files\Common Files\Microsoft etc..
So you see Matlab is first thing.
I also do not see System inside Matlab path command?
EDU>> findstr(path,'system32')
ans =
[]
EDU>> findstr(path,'windows')
ans =
[]
EDU>> userpath
ans =
''
MY question is: Where would Matlab be reading this wrong path from? Is there another place to fix the Matlab path?
related question:
I rebooted windows. Problem is still there.
(ps. this forum is nice, I can edit my post here!)
thanks, --Nasser

采纳的回答

Nasser M. Abbasi
Nasser M. Abbasi 2012-12-1
can one answer their own question here? since I found the solution. If not, I can delete this answer and add this as comment or something. Do not know the rules here.
I just do not know why it happened. But doing this command fixed it
userpath(path)
and now it works
which input
built-in (C:\Program Files (x86)\MATLAB\R2012a Student\toolbox\matlab\lang\input)
something cleared userpath somehow. I do not know how this happened. But I am happy now, Matlab is ok.
  3 个评论
Walter Roberson
Walter Roberson 2012-12-1
Adding your own answer, like you did, is good practice when you find a solution to a problem.

请先登录,再进行评论。

更多回答(1 个)

Image Analyst
Image Analyst 2012-12-1
You might try the "restoredefaultpath" command and see if that fixes it.
  1 个评论
Nasser M. Abbasi
Nasser M. Abbasi 2012-12-1
编辑:Nasser M. Abbasi 2012-12-1
Thanks ImageAnalyst for the suggestion. Tried it. did not fix the problem. ALso restarted Matlab. no change, still points to system:
EDU>> restoredefaultpath
EDU>> which input
C:\Windows\system32\input.dll
also
EDU>> restoredefaultpath; matlabrc
EDU>> which input
C:\Windows\system32\input.dll

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by