Fatal error C1189 when compiling C++ (VS2013) program in Matlab2015a(32-bit)
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposta accettata
Più risposte (0)
Vedere anche
Categorie
Scopri di più su MATLAB Compiler SDK in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!