Solved

namespace in C++

Posted on 2004-04-15
11
2,020 Views
Last Modified: 2013-11-19
Hi guys,
can anyone tell me why this error message: i windwos xp
in debugging process, when i doubleclick on these error message, it takes me to the ligne of code reading: using namespace _STL.
I also try using namespace std; but still
c:\Documents and Settings\komlaaa.ROW-096.000\Desktop\DCPlusPlus-0.401-src\client\stdinc.h(20): error C2871: '_STL' : a namespace with this name does not exist
c:\Documents and Settings\komlaaa.ROW-096.000\Desktop\DCPlusPlus-0.401-src\client\stdinc.h(20): error C2871: '_STL' : a namespace with this name does not exist
c:\Documents and Settings\komlaaa.ROW-096.000\Desktop\DCPlusPlus-0.401-src\windows\stdafx.h(43): fatal error C1083: Cannot open include file: 'atlapp.h': No such file or directory
0
Comment
Question by:achille67
  • 3
  • 3
  • 2
  • +3
11 Comments
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 10838115
This should be
using namespace std;

What do you get when you use this line?
0
 

Author Comment

by:achille67
ID: 10838140
As i mention, i tried that but still
0
 
LVL 4

Expert Comment

by:caner_elci
ID: 10838201
Maybe this thread helps you?
http://dbforums.com/arch/89/2002/5/376114
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 10838205
Do you get the same error message?
0
 

Author Comment

by:achille67
ID: 10839197
yup!
0
 
LVL 7

Expert Comment

by:leflon
ID: 10839907
i'm confused. if you use

using namespace std;

you are still getting
> c:\Documents and Settings\komlaaa.ROW-096.000\Desktop\DCPlusPlus-0.401-src\client\stdinc.h(20): error C2871: '_STL' : a namespace with this name does not exist
??

do you use both 'using xxxxxx' or have you replaced _STL with std?

what about the third error? is there a 'atlapp.h' on your system? the name doesn't sound familiar to me.

leflon
0
 
LVL 16

Expert Comment

by:nonubik
ID: 10840427
maybe the namespace _STL is defined in atlapp.h
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 10840671
Which STL are you using?
0
 

Author Comment

by:achille67
ID: 10842879
Felon: well not the same error but many others.
khkremer:
>Which STL are you using?
 i am working on window xp so i go using namespace _STL which one that can be? i am not too sure.
nonubik:
>maybe the namespace _STL is defined in atlapp.h
but if i uncomment "using namespace _STL" and leave atlapp.h
the prob. is not solved.
0
 
LVL 7

Accepted Solution

by:
leflon earned 125 total points
ID: 10843050
just reading your initial post again...
from the path included in the error message i presume that you try to compile the DC++ project (from sourceforge?)?

to compile this a number of things have to setup correctly (including STLport which seems to introduce the namespace _STL).

are you sure you followed
http://sourceforge.net/docman/display_doc.php?docid=22247&group_id=40287

if there is something missing you may want to check the main project page
http://sourceforge.net/projects/dcplusplus/

if this is not about DC++, i better go and get myself a beer :-)

cheers
leflon
0
 
LVL 2

Expert Comment

by:sitbon
ID: 10845486
Try adding an explicit global scope specifier:

 using namespace ::_STL;

if that doesn't work, you probably need to find that atlapp.h and include it *before* the using directive.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question