使用 Visual C 时找不到 atlbase.h;快报2010

发布于 2024-08-29 19:59:37 字数 597 浏览 5 评论 0原文

因此,我尝试将项目从 Windows XP 上的早期版本移至 Windows 7 上的 Visual C++ Express 2010。我遇到了各种找不到 atlbase.h 的错误。这并不是一个问题,但我想为其他人记录我的解决方案。

从我之前的安装中复制以下 PlatformSDK 文件并将它们放在我的 Windows 7 计算机上。

PlatformSDK/include/atl

PlatformSDK/include/mfc

PlatformSDK/lib

PlatformSDK/src/atl

然后,我将项目属性中的 VC++ 目录更改为指向这些目录。

包含目录

- *include/atl

*include/mfc

库目录 -

*lib

源目录

- *src/atl

对 stdafx.h 进行更改

在此行之后

: #include "atlbase.h"添加此行: extern CComModule _Module;

希望您现在就可以出发了!可能不会,但也许你已经在路上了。

So I tried moving my project to Visual C++ Express 2010 on Windows 7 from a previous version on Windows XP. I got all sorts of errors where atlbase.h was not found. This isn't so much a question but I wanted to document what my resolution was for others.

Copied the following PlatformSDK files from my previous install and put them on my Windows 7 machine.

PlatformSDK/include/atl

PlatformSDK/include/mfc

PlatformSDK/lib

PlatformSDK/src/atl

I then change the VC++ Directories in the project Properties to point to those directories.

Include Directories-

*include/atl

*include/mfc

Library Directories-

*lib

Source Directories-

*src/atl

Make a change to stdafx.h

right after this line: #include "atlbase.h"

add this line: extern CComModule _Module;

Hopefully you're ready to go now! Probably not but perhaps you are well on your way.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

蓝颜夕 2024-09-05 19:59:37

ATL 和 MFC 未包含在 Visual Studio 的免费 Express 版本中。这是查找包含文件时出现问题的主要原因。 ATL 仍然是 WDK 的一部分。如果您的 ATL 与以前版本的 VS 或 WDK 一起安装,您需要进入项目设置并分别更新您的包含目录,以便获取 ATL *.h 文件。有关更多详细信息和讨论,请参阅下面的帖子。

ATL and MFC were not included into free Express versions of Visual Studio. This is the primary reason behind the problems locating the include file. ATL still is is part WDK. If you have ATL isntalled with a previous version of VS, or with WDK, you need to go to project setting an update your includ directories respectively, so that ATL *.h files are picked up. See post below for more details and discussion.

岛徒 2024-09-05 19:59:37

这可能是因为您使用的先前版本是 Visual C++ 6.0 并且不支持它

this is probably because the previous version that you were using was visual c++ 6.0 and that doesn't support it

ゝ杯具 2024-09-05 19:59:37

ATM机,好像不是免费的。

SDK v7.0 示例 - - 没有 atlbase.h

ATM, it seems to be non-free.

SDK v7.0 Samples -- no atlbase.h

橘和柠 2024-09-05 19:59:37

现在,Windows 运行时有一个受 ATL 启发的 WRL 库,它显然支持构建经典 COM 对象(请参阅 http://msdn.microsoft.com/en-us/library/jj822931.aspx)。它包含在 Express 中,但我还没有尝试过。

尽管 ATL 7.1 位于 WDK 7.1 中,但设置起来相当烦人,因此请考虑投票将 ATL 带回 VS Express ;) https://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/3252947-添加 atl-to-visual-studio-2010-express-for-desktop

There is now an ATL-inspired WRL library for the Windows Runtime that apparently supports building Classic COM objects (see http://msdn.microsoft.com/en-us/library/jj822931.aspx). It is included in Express but I haven't tried it.

Even though ATL 7.1 is in WDK 7.1 it's quite annoying to set up so please consider voting to bring back ATL to VS Express ;) https://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/3252947-add-atl-to-visual-studio-2010-express-for-desktop

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文