Fatal error C1189 when compiling C++ (VS2013) program in Matlab2015a(32-bit)
4 次查看(过去 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!