CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2010
    Posts
    7

    Matlab engine from C++ dll not found error

    I am trying to access the matlab engine from C++. I have followed the guide provided by mathworks to set up and compile their demo code using visual studio (http://www.mathworks.com/support/sol...ution=1-78077S). It compiles without errors however when i run the application i receive the message "This application failed to start because libmx.dll was not found. Re-installing the application may fix this problem".

    Thanks in advance.

  2. #2
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Matlab engine from C++ dll not found error

    Quote Originally Posted by Luco View Post
    I am trying to access the matlab engine from C++. I have followed the guide provided by mathworks to set up and compile their demo code using visual studio (http://www.mathworks.com/support/sol...ution=1-78077S). It compiles without errors however when i run the application i receive the message "This application failed to start because libmx.dll was not found. Re-installing the application may fix this problem".
    So where is libmx.dll? The problem is obviously that the DLL doesn't exist, is not accessible in a directory in your PATH, or is not where your executable resides.

    Regards,

    Paul McKenzie

  3. #3
    Join Date
    Jun 2010
    Posts
    7

    Re: Matlab engine from C++ dll not found error

    The dll is not in my directory, it is in matlabroot\R2010a\bin\win32. How do I set up visual studio so the executable knows where it needs to look for the DLL ?

  4. #4
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Matlab engine from C++ dll not found error

    Quote Originally Posted by Luco View Post
    The dll is not in my directory, it is in matlabroot\R2010a\bin\win32. How do I set up visual studio so the executable knows where it needs to look for the DLL ?
    Add that directory to your PATH environment variable.

    Regards,

    Paul McKenzie

  5. #5
    Join Date
    Jun 2010
    Posts
    7

    Re: Matlab engine from C++ dll not found error

    Thank you

    It works now

  6. #6
    Join Date
    Jul 2010
    Posts
    1

    Re: Matlab engine from C++ dll not found error

    Another option is to add the directory to the LD_LIBRARY_PATH environment variable.

    Regards
    Jai Pillai
    http://www.umiacs.umd.edu/~jsp

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured