I'm trying to run the basic Matlab enginedemo.cpp in VS2010 on Windows 7 and no matter what I do the code:
`if (!(ep = engOpen(""))) {
fprintf(stderr, "\nCan't start MATLAB engine\n");
return EXIT_FAILURE;
}`
Always errors.
I had both MatlabR2012b and MatlabR2012a installed on my computer but I uninstalled MatlabR2012a and then removed all references to it from my path variable.
I am running x64 MatlabR2012b and I set my VisualC++ Win 32 Console Application.
I also already set the Debugging Environment to: {MatlabRoot}\R2012b\extern\lib\win64\microsoft
C/C++->Additional Include Directories: {MatlabRoot}\R2012b\extern\include
Linker->General->Additional Library Directories: {MatlabRoot}\R2012b\extern\lib\win64\microsoft
Linker->Input->Additional Dependencies: libmx.lib;libmat.lib;libeng.lib
My Matlab version is also registered so that shouldn't be causing the error.
I searched through some of the other stackoverflow questions concerning this and most of them seemed to fix their problems by removing older versions of matlab from the path variable but it hasn't worked for me.