I have a very annoying problem with Matlab. I have a custom C style DLL to talk to our hardware. It works fine on my PC and fine on my colleague's PC. On a third PC it fails to load with :
Error using ==> loadlibrary at 365 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.
Obviously it can't find the compiler. Yet running !mex -setup gets my the intercative bit to select the only compiler on the machine (VS2008) and checking with !set vs shows the paths as correct. Trying to add paths directly doesn't seem to help either. As I very little idea about Matlab and an extensive trawl of the matlab forums and trying suggestions just doesn't help. Anybody any clues?
I don't do where you added the path directly, but try to add the path where cl.exe is into the:
My Computer -> Properties -> Advanced -> Environment Variables -> System Variables -> PATH
If you open a command prompt (Execute -> cmd.exe) and write "set PATH" (without the ") can you find the right path? What happens if you write cl.exe. Maybe you should execute vcvars32.bat from the right Visual Studio version (i.e. C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With