Problems Using Matlab in C++

Hi everyone,
I'm trying to code a C++ program to use MatLab to calculate DFT for my application (without using MEX). I've tried the following means to link to MatLab libraries: - Adding the include path to the header files and #include the proper header files - Linking to the appropriate .lib files. 'libeng.lib' & 'libmx.lib' - Adding the path to the .dll files.
I am using Visual Studio 2010. When I tried running my application, I get a cryptic error message from MatLab that says: "The application was unable to start correctly. 0xc000003b".
I can't seem to find anything at all. Any help is appreciated. Thanks

 채택된 답변

Walter Roberson
Walter Roberson 2011년 3월 10일

0 개 추천

I would first try running the Windows Dependency Walker

댓글 수: 3

Yong Wen
Yong Wen 2011년 3월 10일
Hi,
I have done that with the .exe file generated by Visual Studio and it tells me it cannot find the two DLLs:
- msvcr80.dll
- IESHIMS.dll
I have Visual C++ 2005 runtime installed and I definitely have IE installed so I don't really know what's wrong though.
Yong Wen
Yong Wen 2011년 3월 10일
Anyway, it doesn't matter. I've managed to fix it.
It had to do with the application being unable to find the correct 64 bit version of the VC++ runtime.
A
A 2011년 7월 4일
Can you tell me, where you found the proper 64 Bit versions?
I do not find the 64 Bit Version of "MSVCR80.DLL".
I am running Win7 64 Bit and Matlab R2009b.
Thank you!

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Kaustubha Govind
Kaustubha Govind 2011년 3월 10일

0 개 추천

As described on the documentation page for Compiling and Linking MATLAB Engine Programs, please also ensure that:
  1. $matlabroot\bin\win32 or $matlabroot\bin\win64 is on the System Path
  2. If you have multiple versions of MATLAB, make sure that one you compiled against is first on the system Path
  3. Start MATLAB as a COM server

댓글 수: 1

Yong Wen
Yong Wen 2011년 3월 10일
Hi, thanks for the help.
I've figured it out. It was basically due to the exe being unable to find the appropriate VC8 runtime in 64 bits. Thanks.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 C Shared Library Integration에 대해 자세히 알아보기

제품

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by