Solved

namespace in C++

Posted on 2004-04-15
11
2,010 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
 
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now