How to add MFC support to existing Win32 C++ Project?(如何将 MFC 支持添加到现有的 Win32 C++ 项目?)
问题描述
我正在创建一个使用 Qt 创建 GUI 的 C++ 应用程序.但是,我需要使用依赖于 MFC 的第三方库(用于 CString 等).有没有办法将 MFC 添加到我的应用程序中以允许我使用这个库,还是我需要自己重写它?
I am creating a C++ application which uses Qt to create the GUI. However, I need to use a third party library which relies on MFC (for CString's, etc). Is there anyway to add MFC to my application to allow me to use this library or do I need to rewrite it myself?
我看到这个问题,但它没有告诉我如何添加MFC 手动到项目中.
I saw this question, but it doesn't tell me how to add MFC manually to the project.
推荐答案
如果库应用采用/返回/使用 CString,则需要与 MFC 库链接,或者 MFC 库已经静态链接.
If the library app takes/returns/uses CStrings it will need linking with the MFC libs, or will have the MFC libs already statically linked.
如果您使用的是 Visual Studio,您可以酌情勾选在静态/共享库中使用 MFC",只要您保留当前程序入口点,它就不会影响您的应用程序 GUI.
If you are using Visual studio you can just check "use MFc in static/shared lib" as appropriate, it doesn;t affect your application GUI as long as you keep your current program entry point.
这篇关于如何将 MFC 支持添加到现有的 Win32 C++ 项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何将 MFC 支持添加到现有的 Win32 C++ 项目?
基础教程推荐
- 我有静态或动态 boost 库吗? 2021-01-01
- 如何在 C++ 中初始化静态常量成员? 2022-01-01
- 如何检查GTK+3.0中的小部件类型? 2022-11-30
- C++结构和函数声明。为什么它不能编译? 2022-11-07
- 静态库、静态链接动态库和动态链接动态库的 .lib 文件里面是什么? 2021-01-01
- 如何将 std::pair 的排序 std::list 转换为 std::map 2022-01-01
- 如何通过C程序打开命令提示符Cmd 2022-12-09
- 常量变量在标题中不起作用 2021-01-01
- 这个宏可以转换成函数吗? 2022-01-01
- 在 C++ 中计算滚动/移动平均值 2021-01-01
