[译]使用免费的Visual C ++ 2005 Express Edition开发Win32应用程序
By robot-v1.0
本文链接 https://www.kyfws.com/applications/using-the-free-visual-c-2005-express-edition-to-de-zh/
版权声明 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
- 8 分钟阅读 - 3542 个词 阅读量 0[译]使用免费的Visual C ++ 2005 Express Edition开发Win32应用程序
原文地址:https://www.codeproject.com/Articles/15676/Using-the-Free-Visual-C-2005-Express-Edition-to-De
原文作者:NeWi
译文由本站 robot-v1.0 翻译
前言
Describes how to set up Visual C++ 2005 Express to build Win32 applications.
介绍如何设置Visual C ++ 2005 Express来构建Win32应用程序.
介绍(Introduction)
Microsoft已经发布了Visual C ++ 2005 Express Edition,即使是用于开发商业应用程序,也可以免费下载和使用.但是,如果您希望开发良好的老式本机32位Windows应用程序(即非.NET),例如使用wxWidgets Framework的应用程序,则需要进行一些配置更改.(Microsoft has released Visual C++ 2005 Express Edition which can be freely downloaded and used, even for developing commercial applications. However, if you wish to develop good old native 32-bit Windows applications (i.e. not .NET) such as applications that use the wxWidgets Framework, you need to make a few configuration changes.)
本文中的信息不是新信息,可以通过谷歌搜索或通过单击找到大多数信息.(The information in this article is not new and most of it can be found by Googling or by clicking) 这个连结(this link) . Microsoft论坛上也有很多文章,但是出于以下原因,我决定创建此文章:(. Much of it is also on the Microsoft forums, but I decided to create this article for the following reasons:)
- 存储此信息以供参考以确保仍可访问(To store this information for reference to ensure it remains accessible)
- 通过将所有内容集中在一个地方来节省时间(我不得不在Google上找到点点滴滴.)(To save people time by having it all in one place (I had to Google to find bits and pieces.))
- 在某个地方可以让人们添加其他有用的信息(Microsoft论坛似乎不再起作用,因此我无法在此处添加注释,并且有些人对此也有所顾忌.)(To have a place where people can add additional useful information (The Microsoft forums do not seem to work anymore, so I cannot add notes on there and some people are stumbling on this as well.))
- 鼓励开发人员释放他们的努力,并帮助他们找到一些不错的免费工具来入门(To encourage developers out there to release their efforts and to help them find some good free tools to get started)
你需要什么(What You Need)
Visual C ++ 2005 Express(Visual C++ 2005 Express)
转到(Go to the) Microsoft网站(Microsoft Web site) 并下载" Visual C ++ 2005 Express".您可能需要下载一个名为(and download “Visual C++ 2005 Express”. Likely you will want to download a file named)VC.iso(VC.iso)(473,720 KB).将其刻录到CD上,或使用免费工具(例如VCdControlTool或DiskPrivate)访问内容.使用默认位置安装它.((473,720 KB). Burn this to a CD or use a free tool such as VCdControlTool or DiskPrivate to access the contents. Install it using the default locations.)
平台SDK(Platform SDK)
从Microsoft网站下载Platform SDK.我有(Download the Platform SDK from Microsoft’s Web site. I got)PSDK_x86.exe(PSDK_x86.exe)(1.26 MB).搜索将找到" Microsoft®Windows Server®2003 R2 Platform SDK Web安装"的Platform SDK(((1.26 MB). Search for Platform SDK which will locate “Microsoft ® Windows Server® 2003 R2 Platform SDK Web Install” () 在这里查看链接(See link here) ).如果向下滚动,您将看到(). If you scroll down you will see)PSDK_x86.exe(PSDK_x86.exe).那是您唯一需要的部分.(. That is the only piece you need.)
使用默认的推荐设置安装Platform SDK.我没有运行批处理文件以在Visual C ++中对其进行注册(它将其放入"开始"菜单中,但是如果您运行它似乎无法完成任何工作,所以我让它使用"开始"菜单中的选项再次注销了自己) .(Install the Platform SDK using its default recommended settings. I did not run the batch file to register it with Visual C++ (it puts it in the Start menu but it does not seem to accomplish anything if you do run it, so I had it unregister itself again using the option in the Start menu).)
如何使Visual Studio与Platform SDK一起使用(How to Make Visual Studio Work with the Platform SDK)
其中大多数是基于官方说明,(Most of this is based on the official instructions which can be found) 这里(here) .(.)
包括目录(Include Directories)
如果不解决此问题,则会出现错误,例如无法包含(Without fixing this, you will get errors such as not being able to include)视窗(windows.h).启动Visual Studio,然后在"选项"对话框的"项目和解决方案"部分下的菜单中,将路径添加到相应的小节:(. Start Visual Studio and in the menu under the Projects and Solutions section in the Options dialog box, add the paths to the appropriate subsections:)
-
可执行文件:(Executable files:)C:\ Program Files \ Windows Server 2003 R2的Microsoft Platform SDK \ Bin(C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin)
-
包含文件:(Include files:)C:\ Program Files \ Windows Server 2003 R2的Microsoft Platform SDK \ Include(C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include)
-
库文件:(Library files:)C:\ Program Files \ Windows Server 2003 R2 \ Lib的Microsoft平台SDK(C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib) 确保检查Visual Studio是否记住了这些路径!关闭视图并返回那里,并确保它能记住它们!也可以使用Windows资源管理器来验证这些目录,因为SDK可能已安装到其他目录.这些目录实际上可能是:(Be sure to check that these paths are remembered by Visual Studio! Close the view and go back there and make sure it remembers them! Also use Windows Explorer to verify these directories as the SDK may have installed to a different directory. The directories may in fact be:)
-
可执行文件:(Executable files:)C:\ Program Files \ Microsoft Platform SDK \ Bin(C:\Program Files\Microsoft Platform SDK\Bin)
-
包含文件:(Include files:)C:\ Program Files \ Microsoft Platform SDK \ Include(C:\Program Files\Microsoft Platform SDK\Include)
-
库文件:(Library files:)C:\ Program Files \ Microsoft Platform SDK \ Lib(C:\Program Files\Microsoft Platform SDK\Lib) 这是许多人的主要绊脚石.在添加目录之前,请先对其进行验证!(This is a major stumbling block for many people. Verify the directories before adding them!)
默认链接库(Default Link Libraries)
如果不解决此问题,您将获得有关Windows API函数的未解决的外部链接错误.关闭Visual Studio,然后编辑(Without fixing this, you will get unresolved external link errors about Windows API functions. Close Visual Studio and then edit)**C:\ Program Files \ Microsoft Visual Studio 8 \ VC \ VCProjectDefaults \ corewin_express.vsprops(C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults\corewin_express.vsprops)**并更改:(and change:)
AdditionalDependencies="kernel32.lib"
至:(to:)
AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"
启用Win32应用程序(Enable Win32 Applications)
编辑档案(Edit the file)C:\ Program Files \ Microsoft Visual Studio 8 \ VC \ VCWizards \ AppWiz \ Generic \ Application \ html \ 1033 \ AppSettings.htm(C:\Program Files\Microsoft Visual Studio 8\VC\VCWizards\AppWiz\Generic\Application\html\1033\AppSettings.htm).使用记事本或任何纯文本编辑器,将////放在以下各行的前面(以及其他任何行(. Using Notepad or any plain text editor, put // in front of the following lines (as well as any other) disabled = true
行,如果你想):(lines if you want):)
WIN_APP.disabled = true;
WIN_APP_LABEL.disabled = true;
DLL_APP.disabled = true;
DLL_APP_LABEL.disabled = true;
但…(BUT…)
那应该做到的!但…(And that should do it! BUT…)
你没有得到什么(What You Do Not Get)
MFC呢?(What About MFC?)
不包含.您可以使用wxWidgets之类的东西作为新开发工作的替代方法.如果您需要MFC,则可能需要付费.(Not included. You can use something like wxWidgets as an alternative for new development work. Likely if you want MFC though, then you need to pay.)
ATL/WTL呢?(What About ATL / WTL?)
不包含.但是,您显然可以按照另一个CodeProject文章中所述获得ATL/WTL,(Not included. However, you can apparently get ATL / WTL as explained in another CodeProject article,) 使用(Using)WTL(WTL)与(with)视觉效果(Visual)C ++(C++)2005 Express Edition(2005 Express Edition) .(.)
那么免费资源编辑器呢?(What About a Free Resource Editor?)
Studio Express不允许您编辑资源文件.摘自上述文章,您可以尝试:(Studio Express does not let you edit resource files. Taken from the above article, you can try:)
- 这里有一个(Here is a) 免费资源编辑器列表(list of free resource editors) (看起来像Watcom C ++编译器具有一个独立的资源编辑器应用程序)((Looks like the Watcom C++ compiler has a standalone resource editors application))
- WEditRes(WEditRes)
- 或(对于似乎也可以让您编辑资源的IDE):(Or (for an IDE that also seems to let you edit resources):) RadASM©Win32汇编IDE for masm/tasm/fasm/nasm/goasm/hla(RadASM© Win32 assembly IDE for masm/tasm/fasm/nasm/goasm/hla)
- wxWidgets还具有某种系统,您可以在其中使用XML来定义资源,并且有免费的RAD应用程序,但是我尚未对此进行研究.(wxWidgets also has some sort of system where you use XML to define your resources and there are free RAD applications, but I have not looked into that yet.)
关于安装程序呢?(What About an Installer?)
如果您希望为应用程序创建安装/卸载,建议您尝试免费的Inno编译器.免费,甚至易于使用的商业应用程序.(If you wish to create an install/uninstall for your applications, I suggest you try the free Inno compiler. Free for commercial applications even and easy to use.)
与Visual Studio集成的其他编译器呢?(What About Other Compilers that Integrate with Visual Studio?)
Visual Studio Express不允许您安装直接与Visual Studio Express集成的其他编译器,例如Intel Fortran.但是,其中一些提供了自己的IDE.(Visual Studio Express does not let you install other compilers such as Intel Fortran that integrate directly with Visual Studio Express. However, some of these provide their own IDEs.)
最后评论(Final Comment)
如果您知道在这方面可能很方便的其他真正免费的软件,请发表评论.(If you know of other truly free software pieces that may be handy in this regard, please post a comment.)
历史(History)
- 23(23)rd(rd)2006年9月:初始职位(September, 2006: Initial post)
许可
本文以及所有相关的源代码和文件均已获得The Code Project Open License (CPOL)的许可。
C++ VC8.0 Windows Win32 Visual-Studio VS2005 Dev 新闻 翻译