I already searched for solutions online, but nothing helped me. I want to code a simple Chat in C++, everything is fine, but I get this error:
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]
I already defined
#define _AFXDLL
but the error is still occures. Any help is apprecicated!
There are two settings that must agree with each other:
(1) Project > Properties > General > Use of MFC
(2) Project > Properties > C/C++ / Code Generation / Runtime Library
If (1) is set to Use MFC in static library
, then (2) must be Multithreaded (/MT)
or Multithreaded Debug (/MTd)
(in Release and Debug builds, correspondingly). If (1) is Use MFC in Shared DLL
, then (2) must be Multi-threaded DLL (/MD)
or Multi-threaded Debug DLL (/MDd)
.
When the two don't agree, you get the error you've shown.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With