Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
257 views
in Technique[技术] by (71.8m points)

atl - atlbase.h not found when using Visual C++ Express 2010

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...