atlbase.h not found when using Visual C++ Express 2010
Asked Answered
T

4

13

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.

Tseng answered 21/4, 2010 at 7:32 Comment(1)
"Hopefully you're ready to go now! Probably not but perhaps you are well on your way." lol? What was your previous version?Shipe
M
10

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.

Madlin answered 25/10, 2011 at 5:53 Comment(0)
P
0

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

Pedicular answered 21/4, 2010 at 14:35 Comment(1)
Previous version Visual C++ Express 2008 or 2009 I forget. The most recent version before 2010Tseng
S
0

ATM, it seems to be non-free.

SDK v7.0 Samples -- no atlbase.h

Seriema answered 25/9, 2011 at 0:11 Comment(0)
V
0

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

Vasoconstrictor answered 16/9, 2014 at 2:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.