MATLAB Engine Windows 7 problem
I am trying to figure how to use the Matlab engine so I can use C++ GUI with matlab function however I am having some trouble trying to figure out how to use the MATLAB engine classes. The first thing I did was try to run their examples after a bit of trying I go this error upon a successful build, "The application was unable to start correctly 0xc000007b" How do I fix this and will this? In addition I attempted to run my own code too,开发者_运维百科 even though it was simple it still did not work.
Note: a did a couple of searches and all I found was that there is a simmilar porblem with adobe cs5, Also I ran dependency walker and it said it did not find any dependencies on libeng.dll Here is what I ran;
int main(){
Engine *ep;
ep = engOpen(NULL);
engEvalString(ep, "3+4");
return 0; }
The system is Windows 7 enterprise 64 bit
This error is likely due to incorrect installation or multiple installations of Matlab on your machine. Check your Windows %PATH%
environment variable by opening a command window and typing
echo %PATH%
When it contains references to more than a single Matlab installation, edit %PATH%
and remove all of them except the reference to the installation you are going to use with your program. The following dlls must be in your %PATH%
: libeng.dll and libmx.dll. Don't copying these dlls to a system directory -- change your %PATH%
instead.
Make sure to execute this command on the command line to register the Matlab engine with Windows COM.
matlab /regserver
精彩评论