views:

1791

answers:

2

I have two apps:

  1. Win32 Console App.

  2. MFC GUI App.

I wanted to execute the console app in MFC GUI and I am want to get data from that Console app and display them in GUI.

I get this error: "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]" while compiling.

Is IPC the answer?

+1  A: 

The build error you get is irrelevant with what you are trying to achieve. To capture the output of a console application in a window, I refer you to this excellent article in CodeProject.

kgiannakakis
A: 

"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]" while compiling.

There is a mismatch in the way you are using the CRT library between the two projects. You need to use the same CRT and the same linkage mode for the CRT for both the projects.

SDX2000