Compiling C++ files using MEX
===

I want to use MEX for compiling C\C++ files on MATLAB. I tried mex-setup first then mex xyz.cpp. But I am still getting error "E:\MATLAB~1\BIN\MEX.PL: Error: Compile of 'xyz.cpp' failed."

Can anyone offer some suggestions ?

Thanks 
 