如何使用Visual Studio 2010从源代码构建MFC库 [英] How to build MFC library from source with Visual Studio 2010

查看:211
本文介绍了如何使用Visual Studio 2010从源代码构建MFC库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Visual Studio一直以来都将MFC库作为源提供,因此您可以使用提供的makefile自己构建它.但是在Visual Studio 2010中,没有用于MFC的makefile.那么,如何重建它?

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?

有关MS的文档暗示应该存在makefile: http://msdn.microsoft.com/en-us/library/bs046sh0.aspx

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

..也许是一个疏忽,或者他们将其迁移到了msbuild,却忘记了包含mfc msbuild项目文件.

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

如果有人成功基于VS2010中的内容成功构建了自定义MFC,您如何构建它? VS2008中的makefile可以以最小的调整使用吗?还是有人有一个msbuild脚本吗?

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.

推荐答案

由于MFC毕竟是一个库,因此您只需在Visual Studio中创建一个新项目并将所有MFC源文件添加到其中即可.设置选项以创建静态库,根据需要设置编译/链接器选项(最终基于2008 makefile),即可开始使用.

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.

这篇关于如何使用Visual Studio 2010从源代码构建MFC库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆