-
June 18th, 2012, 01:55 PM
#1
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?
-
June 18th, 2012, 02:12 PM
#2
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"
-
June 18th, 2012, 02:19 PM
#3
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.
-
June 18th, 2012, 04:27 PM
#4
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:
.../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.
-
June 19th, 2012, 01:34 AM
#5
Re: Use of MFC : Use Standard Windows Libraries What does this do?
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
Best regards,
Igor
-
June 19th, 2012, 10:28 AM
#6
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|