Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++ - documentation: "namespace 'Foo' does not enclose '?0' of namespace 'Foo'"
I've looked for documentation on this error, since I've just encountered it. I could upload the preprocessed version of the source code, but the basic jist of it is as follows: namespace Foo { class Layer { public: Layer(); virtual ~Layer(); }; }; namespace Foo { Layer::Layer() /* <-- here's where error is encoutered */ { // various initialization code } } Any clues as to what causes the compiler to complain and what can I do to hack around it? -scooter Jan 14 2004
What is the error you are getting? I am pretty sure I have this in code several times and no problems what-so-ever... Scott Michel wrote:I've looked for documentation on this error, since I've just encountered it. I could upload the preprocessed version of the source code, but the basic jist of it is as follows: namespace Foo { class Layer { public: Layer(); virtual ~Layer(); }; }; namespace Foo { Layer::Layer() /* <-- here's where error is encoutered */ { // various initialization code } } Any clues as to what causes the compiler to complain and what can I do to hack around it? -scooter Jan 14 2004
Jan Knepper wrote:What is the error you are getting? I am pretty sure I have this in code several times and no problems what-so-ever... Jan 14 2004
Scott Michel wrote:Jan Knepper wrote:What is the error you are getting? I am pretty sure I have this in code several times and no problems what-so-ever... Jan 14 2004
Here's the compiler's output. I tried to get a sane listing file, but it's incomplete. sc -Ae -Ar -mn -C -WD -S -Ns -R -ND -5 -a8 -c -gf -gp -DFLAPPSDLL_EXPORTS -DDLL_EXPORTS -D_DLL -I\dm\stlport\stlport -I. -I.\include -I.\sprng2. \include -o.\build\flappslayer.obj SRC\flappslayer.cxx Error: D:\USERS\SCOTTM\PLAY\FLAPPS-JNI\SRC\flappslayer.cxx(60): namespace 'FLAPPS' does not enclose member '?0' of namespace 'FLAPPS' Error: D:\USERS\SCOTTM\PLAY\FLAPPS-JNI\SRC\flappslayer.cxx(69): namespace 'FLAPPS' does not enclose member '?0' of namespace 'FLAPPS' Error: D:\USERS\SCOTTM\PLAY\FLAPPS-JNI\SRC\flappslayer.cxx(79): namespace 'FLAPPS' does not enclose member '?R' of namespace 'FLAPPS' Error: D:\USERS\SCOTTM\PLAY\FLAPPS-JNI\SRC\flappslayer.cxx(87): namespace 'FLAPPS' does not enclose member '?R' of namespace 'FLAPPS' Fatal Error: D:\USERS\SCOTTM\PLAY\FLAPPS-JNI\SRC\flappslayer.cxx(99): too many errors Lines Processed: 53222 Errors: 5 Warnings: 0 Build failed Jan Knepper wrote:What is the error you are getting? I am pretty sure I have this in code several times and no problems what-so-ever... Scott Michel wrote:I've looked for documentation on this error, since I've just encountered it. I could upload the preprocessed version of the source code, but the basic jist of it is as follows: namespace Foo { class Layer { public: Layer(); virtual ~Layer(); }; }; namespace Foo { Layer::Layer() /* <-- here's where error is encoutered */ { // various initialization code } } Any clues as to what causes the compiler to complain and what can I do to hack around it? -scooter Jan 14 2004
Try to add a ';' Scott Michel wrote:I've looked for documentation on this error, since I've just encountered it. I could upload the preprocessed version of the source code, but the basic jist of it is as follows: namespace Foo { class Layer { public: Layer(); virtual ~Layer(); }; }; namespace Foo { Layer::Layer() /* <-- here's where error is encoutered */ { // various initialization code } Jan 15 2004
It turns out that I was missing a '}' at the end of a much earlier header file. I realize that one trades something for speed (TANSTAAFL), but error messages could be a little bit better, e.g., hit the end of the file and scopes arent closed (seems to be the problem in this case.) Another small nit is when an error occurs in a header file, it'd be nice to see the header stack that led up to the error. For an inexpensive compiler and IDDE (and I bought the CD), it ain't bad. Also, this error message does need to show up in the documentation. -scooter Jan Knepper wrote:Try to add a ';' Scott Michel wrote:I've looked for documentation on this error, since I've just encountered it. I could upload the preprocessed version of the source code, but the basic jist of it is as follows: namespace Foo { class Layer { public: Layer(); virtual ~Layer(); }; }; namespace Foo { Layer::Layer() /* <-- here's where error is encoutered */ { // various initialization code } Jan 15 2004
|