Fatal error C1189 when compiling C++ (VS2013) program in Matlab2015a(32-bit)
조회 수: 2 (최근 30일)
이전 댓글 표시
Hello, I am using Matlab2015a(32-bit) to compile C++ program to mex file. The compiler is Microsoft visual C++ 2013 Professional.
The code could be compiled successfully in VS2013 but error occurred when compiled it in Matlab. The error message is:
C:\Exp softwares\VS2013\ATLMFC\INCLUDE\afx.h(24): fatal error C1189: #error: Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d].
Similiar error occurred when I firstly compiled it in VS2013. After I set "Use of MFC" to "Use MFC in a shared DLL" in the property of the project, the problem solved in VS, but not in Matlab.
The code called external dll file to realize the function of data collection from a peripheral hardware. I want to use the port of the mex function to transfer data into Matlab to do futher online analysis.
Please let me know any way that could help me to fix this error. Thank you very much!


댓글 수: 0
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 MATLAB Compiler SDK에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!