2
votes

I've already read this, and none of the solutions worked.

  1. Use of MFC is set to Use MFC in a shared DLL file for all configurations.
  2. _AFXDLL is defined under C/C++ PreProcessor /MDd and /MD are defined for debug and release configurations respectively
  3. I've tried cleaning and building.
  4. I've tried manually deleting bin directories and rebuilding, yet I still get the same error telling me to do what I have already done.

The error is. 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]

This is a VC++ 6.0 dll project upgraded by VS2015.

1
The error messages told you to define a different symbol than you did. You need to exercise more diligence when communicating with a machine.IInspectable
You mean _AFXDLL rather than AFXDLL? If so, that is just a typo in the question. I didn't define the symbol at all. The IDE did. I'll edit the question to fix that.shawn1874

1 Answers

3
votes

I figured it out. For some reason, the "Inherit from parent or project defaults" option was not checked. Selecting the correct project properties added _AFXDLL within the inherited values section. Checking that worked. When I upgraded other projects I don't think that was unchecked. Maybe I unchecked it for some reason and forgot about it. Anyway, one shouldn't have to manually added _AFXDLL to the preprocessor definitions. Get the project settings fixed, and just make sure that you are inheriting the values that were automatically filled into that inherited values box by the IDE.

enter image description here