Error using loadlibrary, no supported compiler or SDK was found despite installed .NET 4.6 SDK

5 vues (au cours des 30 derniers jours)
I have problems with the loadlibrary command in MatLab. I tried to run the following example from the MatLab documentation:
addpath(fullfile(matlabroot,'extern','examples','shrlib'))
if not(libisloaded('shrlibsample'))
loadlibrary('shrlibsample')
end
but receive the following error
Error using loadlibrary
No supported compiler or SDK was found. You can install the freely available MinGW-w64 C/C++ compiler; see
Install MinGW-w64 Compiler. For more options, visit http://www.mathworks.com/support/compilers/R2017a/.
Error in loadlibrary
However, I do have the Microsoft .NET Framework 4.6.2 SDK (Version 4.6.01590) installed which, according to the link in the error message, should be supported. I tried it with MatLab R2017a (9.2.0.556344) on a 64bit Win7 OS. What am I missing?

Réponses (1)

Jan
Jan le 20 Juin 2017
You do not need the .NET SDK, but a "compiler or SDK". "SDK" means "Software Development Kit", such that it is not enough to install any "SDK".
Either install the MSVC 7.1 SDK (search in the forum for instructions) or follow the message and install MinGW.

Catégories

En savoir plus sur .NET Assembly Integration dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by