How to build MFC library from source with Visual Studio 2010

自闭症网瘾萝莉.ら 提交于 2019-12-12 11:32:12

问题


Visual Studio has historically always included the MFC library as source so you can build it yourself with the supplied makefile. But in Visual Studio 2010 there is no makefile for MFC. So, how can you rebuild it?

There is documentation on MS implying the makefile should be there: http://msdn.microsoft.com/en-us/library/bs046sh0.aspx

.. so perhaps its an oversight, or perhaps they migrated it to msbuild but forgot to include the mfc msbuild project file.

If anyone has succesfully built a custom MFC based on that in VS2010 how did you build it? Can the makefile from VS2008 be used with minimal tweaks? Or does anyone have an msbuild script for it?

I'm only interested in a statically linked library to be used with a specific app.


回答1:


since in the end MFC is a library as any other, you can just create a new project in visual studio and add all MFC source files to it. Set the options to create a static library, set compilation/linker options as desired (eventually based on the 2008 makefile) and you're ready to go.



来源:https://stackoverflow.com/questions/6927672/how-to-build-mfc-library-from-source-with-visual-studio-2010

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!