loadlibrary Problem: Reference to non-existent field 'The system cannot find the path specified. VSINSTALLDIR'.

5 views (last 30 days)
Hi, When I try to use the 'loadlibrary' command, I get the error, 'Reference to non-existent field 'The system cannot find the path specified. VSINSTALLDIR'.'
Does anybody know how to fix this?
The error appears to be coming from the getLoadlibraryCompilerConfiguration function, where mex.getCompilerConfigurations('C','Selected') is called.
Calling this function leads to the error: Reference to non-existent field 'The system cannot find the path specified. VSINSTALLDIR'.
Error in mex.CompilerConfigurationFactory/determineLocation (line 275)
location = detailStruct.(outputValue);
Error in mex.CompilerConfigurationFactory/process (line 130)
basicStructArray(numberOfLangs).Location = determineLocation(obj,
storageLocations{index}, basicStructArray, detailsStruct);
Error in mex.getCompilerConfigurations (line 56)
compConfig = process(ccF);
Any help would be greatly appreciated.
Thanks, Taylor
  4 Comments
Friedrich
Friedrich on 6 Apr 2013
Edited: Friedrich on 6 Apr 2013
That environment variable (VSINSTALLDIR) is set in the mexopts.bat file in your matlab preference folder. Type "prefdir" in MATLAB to figure out where that is. Normally in that file there should be a line similar to this
set VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 10.0
Could you check that file for that entry and verify if that entry is valid? Do you have setup an environment variable called MATLAB_PREFDIR?
Taylor
Taylor on 7 Apr 2013
The VSINSTALLDIR in the mexopts.bat file has the following line: set VSINSTALLDIR="C:\Program Files (x86)\Microsoft Visual Studio 10.0" I've tried this with and without the quotation marks.
Thanks, Taylor

Sign in to comment.

Accepted Answer

Friedrich
Friedrich on 12 Apr 2013
Hi,
should be a "&" in your environment Variable PATH:

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!