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

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 commentaires

have you run mex -setup before you use loadlibrary? if so, could you successful select a compiler? if so, which one did you choose? Which MATLAB version are you using?
Yes. I have run the mex -setup (a couple times). I can compile mex files with no error (I get no errors when compiling the Matlab yprime.c file). I'm using Matlab 2011b with the Windows SDK 7.1. When running mex -setup, I select the option [1] Microsoft Software Development Kit (SDK) 7.1 in C:\Program Files (x86)\Microsoft Visual Studio 10.0. Thanks, Taylor
Thanks, Taylor
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?
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

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by