如何独立于 .NET 或其他 Libs 为带有 GUI 的 Windows 制作可移植的 C++ 程序? [英] How can i make a portable C++ program for Windows with GUI, independent from .NET or other Libs?

查看:52
本文介绍了如何独立于 .NET 或其他 Libs 为带有 GUI 的 Windows 制作可移植的 C++ 程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想制作一个C++程序图形用户界面,在Windows平台上运行.

I want to make a C++ program with Graphical User Interface, to be running on Windows platforms.

我希望它独立于任何像 .NET 这样的库.

我想要这个的原因是因为我希望这个程序能够在任何版本的 Windows (XP, VISTA, 7 - 32 & 64bit) 中运行,而无需用户绑定已经安装的库像.NET.

The reason I want this is because I want this program to be able to run everywhere, in every version of Windows (XP, VISTA, 7 - 32 & 64bit) without the user to be bound to have already installed a library like .NET.

另外,我希望它便携:整个程序只由一个 exe 文件组成.

Also, I want it to be portable: the whole program to consist from only one exe file.

总结一下:

如何制作一个单一 exe 文件的 GUI C++ 程序,能够在所有版本的 Windows 上运行,而无需使用它的用户在 Windows 上预安装库?

我的系统上已经安装了 MS Visual C++ 2010 Express 和带有 Cygwin 的 G++ 编译器的 Eclipse.

I have already MS Visual C++ 2010 Express and Eclipse with Cygwin's G++ compiler installed on my system.

注意:我不介意使用任何用于 Windows GUI 设计的库如果有办法将它们嵌入到程序的可执行文件中.

Notice: I don't mind to use any libraries for windows GUI design if there is a way to embed them inside the executable file of the program.

推荐答案

您可以使用可以静态链接的库(MFC、WTL)或直接使用 Win32 API.

You can either use a library that can be statically linked (MFC, WTL) or use Win32 API directly.

这篇关于如何独立于 .NET 或其他 Libs 为带有 GUI 的 Windows 制作可移植的 C++ 程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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