Matlab does not recognize my executable file unless I locate it in the Matlab shortcut's start path

5 ビュー (過去 30 日間)
Environment: 1) Windows 7 64 bit 2) Matlab R2011b 3) Windows path environment variable includes the path to my *.mexw64 file and all its required dll's. 4) Matlab path variable includes the path to my *.mexw64 file
Issue: Matlab does not recognize my 'C' executable 'ConnSpiderServer.mexw64' unless I locate it in the start folder of the Matlab shortcut. (When I locate it there my command works fine).

採用された回答

Michael
Michael 2011 年 10 月 31 日
I talked with Matlab's Technical Support, and between us we found the solution.
First Matlab uses a file known as pathdef.m to define its paths. This file is located at %MATLAB_ROOT%\toolbox\local. I was using a startup.m file to add the path to my *.mexw64 file, but this extra path was not updating the pathdef.m file that Matlab uses. Apparently, (even though I was starting Matlab as a user with administrator rights), the pathdef.m file was not getting updated by startup.m. The solution was to manually edit pathdef.m, save it to a temporary folder, and then to copy it to the %MATLAB_ROOT%\toolbox\local location. (Windows 7 asks perimission to perform the copy when you do this). After doing this Matlab can now see ConnSpiderServer.mexw64 (my mex command).
  1 件のコメント
Michael
Michael 2011 年 10 月 31 日
Be sure you don't have a pathdef.m file in your current folder, or Matlab will use it instead of the one at %MATLAB_ROOT%\toolbox\local.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by