I'm new to C++ programing. the compiler can't find "atlstr.h" to include.
I searched alot for this file but I couldn't find.
Please, and body knows how to find it , tell me ASAP.

7 Years
Discussion Span
Last Post by DrMAF

If it's not part of your compiler, it won't work even if you do find it. Adding a header does no good without the associated code.


Are you using Visual C++ Express? atlstr.h is part of the ATL library which only comes with retail versions of Visual Studio. If you're confident enough to do some hacking, you can use the freely available WTL instead (instructions can be found here).

Why do you need that header? When learning C++, one should stick to the standard libraries for a while.


You probably created the wrong kind of project in VS. When creating a new project choose "win32" and not ATL.
In the next step uncheck ATL, MFC and Precompiled headers and choose "console application".


I tried to use codeblocks then I moved to VC++.
I am not attending to hacke.
I don't even know how to write a nice complete program in C++.
I just tried to learn game programing through this link:
the file stdafx.h is not involved in headrs, so I searchd and added it, and this file asked for atlstr.h

That is all the story.

Thank you AAAAAAAAAAAAll for your answers.

I'm still waiting for your advice.

Votes + Comments

When you create a new project with vc++ the IDE will generate the stdafx.h header file for you. The contents of stdafx.h will depend on the kind of project you created. If you copied stdafx.h from somewhere else such as from a site on the internet then most likely it will contain the wrong stuff.

Here is a link you want to read so that you can get started using the compiler/IDE Read the Getting Started thread first.


Thank you very much.
I followed the link and I think I'll start to learn every thing from scratch.
Thank you again and I'm sure that, I'll be back soon for your help.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.