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

5 visualizzazioni (ultimi 30 giorni)
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).

Risposta accettata

Michael
Michael il 31 Ott 2011
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 Commento
Michael
Michael il 31 Ott 2011
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.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Startup and Shutdown in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by