Why do I receive an error when I use the LOADLIBRARY command in MATLAB 7.10 (R2010a)?

7 views (last 30 days)
I am using 64-bit MATLAB on 64-bit Windows. I have installed Visual Studio 2008 as well. However when I try to load a library with the LOADLIBRARY command this way:
addpath([matlabroot '\extern\examples\shrlib'])
loadlibrary shrlibsample shrlibsample.h
I get the error:
??? Error using ==> loadlibrary at 368
Failed to preprocess the input file.
Output from preprocessor is:'cl' is not recognized as an internal or external command,
operable program or batch file.
I would like to know why I get this error even though I have the supported MSVC 2008 professional edition installed on my machine.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 10 Nov 2011
This error message means that the x64 Compilers and Tools was not installed during the MSVC installation.
The default installation of Visual Studio 2008 is only capable of building 32-bit binaries, and will not work with MATLAB. In order to build 64-bit binaries, the "x64 Compilers and Tools" and Microsoft Windows Software Development Kit (SDK) must both be installed. The x64 Compilers and Tools are not installed by default.

More Answers (0)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products


Release

R2010a

Community Treasure Hunt

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

Start Hunting!