Use of MFC : Use Standard Windows Libraries What does this do?
I have a basic MFC dialog based app. I see in the compiler options, one of the configuration options is the use of MFC. I see an option for static, shared DLL and Use Standard Windows libraries. What exactly does this last option do opposed to the other two types?
I figured since I was using MFC and then selecting the Use Standard Windows Libraries that it might not link or run, but it seems to run just fine. Am I no longer dependent upon various MFC Dlls using this option?
Re: Use of MFC : Use Standard Windows Libraries What does this do?
From the Visual Studio help when you're in the properties dialog...
"Non-MFC projects can select Use Standard Windows Libraries to link to various Win32 libraries that are included when you use MFC"
Re: Use of MFC : Use Standard Windows Libraries What does this do?
Yeah, I read that, and it doesn't really tell me anything. Logically if I had an MFC project then selecting that option would cause my program to not link or run because the MFC libraries are not there, right? Yet I can build and run an MFC application using those settings.
So, I want to know why this is and what is really going on, if anyone knows.
Re: Use of MFC : Use Standard Windows Libraries What does this do?
You probably have made some other changes that make the project build regardless of that setting.
I made a fresh MFC MDI application in VC2005 and changed to use 'Use Standard Windows Libraries' and got:
Quote:
.../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]
Defining _AFXDLL made it build and run for MBCS but fail in linking for UNICODE.
Re: Use of MFC : Use Standard Windows Libraries What does this do?
Quote:
Defining _AFXDLL made it build and run for MBCS but fail in linking for UNICODE.
To link for UNICODE you need to define entry point explicitly: /entry:wWinMainCRTStartup
Re: Use of MFC : Use Standard Windows Libraries What does this do?
I didn't bother why it failed in UNICODE since I felt that the MBSC solution was probably enough to explain why DeepT's project built successfully.
Anyway, thanks Igor! It's always nice to get new knowledge. I didn't know that. Probably because I always use the project settings dialog.