Compiling a cpp file in vc gives stack overflow 
Author Message
 Compiling a cpp file in vc gives stack overflow

Hi All,

I have vc6.0 running on Win2000 Server (& Professional on some other
box)with sp5 installed. I have a cpp file that used to compile perfectly
until I added new functionality to it (and some #includes during the
course). Now when I try to compile I get an error :

       c:\program files\microsoft visual studio\vc98\include\map(46) : see
refe
rence to class template instantiation 'std::_Tree<class JFPersistent const
*,str
uct std::pair<class JFPersistent const * const,int>,struct std::map<class
JFPers
istent co
nst *,int,struct std::less<class JFPersistent const *>,class
std::allocator<int>
 >::_Kfn,struct std::less<class JFPersistent const *>,class
std::allocator<int>

Quote:
>' being compiled

fatal error C1063:
            ^^^^^|----------- MSDN Library tells this is stack overflow

From MSDN:

Fatal Error C1063
compiler limit : compiler stack overflow

The program was too complex and caused the compiler stack to overflow.
This error may be a result of recursive includes.

Have anybody faced this situation before ? I searched and found few places
where ppl got it fixed with sp5. I installed sp5 quite some time back and
also reinstalled after I got into this problem. Still its not fixed.

Any help will be highly appriciated.

Thanks in advance
Ashish



Mon, 25 Apr 2005 19:09:17 GMT  
 Compiling a cpp file in vc gives stack overflow

| Hi All,
|
| I have vc6.0 running on Win2000 Server (& Professional on some other
| box)with sp5 installed. I have a cpp file that used to compile perfectly
| until I added new functionality to it (and some #includes during the
| course). Now when I try to compile I get an error :
|
|        c:\program files\microsoft visual studio\vc98\include\map(46) : see
| refe
| rence to class template instantiation 'std::_Tree<class JFPersistent const
| *,str
| uct std::pair<class JFPersistent const * const,int>,struct std::map<class
| JFPers
| istent co
| nst *,int,struct std::less<class JFPersistent const *>,class
| std::allocator<int>
|  >::_Kfn,struct std::less<class JFPersistent const *>,class
| std::allocator<int>
| >' being compiled
| fatal error C1063:
|             ^^^^^|----------- MSDN Library tells this is stack overflow
|
| From MSDN:
|
| Fatal Error C1063
| compiler limit : compiler stack overflow
|
| The program was too complex and caused the compiler stack to overflow.
| This error may be a result of recursive includes.
|
| Have anybody faced this situation before ? I searched and found few places
| where ppl got it fixed with sp5. I installed sp5 quite some time back and
| also reinstalled after I got into this problem. Still its not fixed.
|
| Any help will be highly appriciated.
|
| Thanks in advance
| Ashish

Hi Ashish,

Not this particular problem, but I've seen similar.

Verify all headers are guarded (#ifndef, #define, #endif).
Also, sometimes the header will bring in the .c/.cpp file. Verify that if the
header is bringing in the implementation, the .c/.cpp file is guarded. This is
sometimes required on template code.

I tend to get lazy, and just #pragma once the files.

Jeff



Mon, 25 Apr 2005 22:22:45 GMT  
 Compiling a cpp file in vc gives stack overflow
Hi Waltson,
I figured out that if I turn the browser info generation, my file compiles.
I turned it on and added pragmas instead. Once the warnings are supressed
everything works. Thanks for your reply.
Ashish


Quote:


> | Hi All,
> |
> | I have vc6.0 running on Win2000 Server (& Professional on some other
> | box)with sp5 installed. I have a cpp file that used to compile perfectly
> | until I added new functionality to it (and some #includes during the
> | course). Now when I try to compile I get an error :
> |
> |        c:\program files\microsoft visual studio\vc98\include\map(46) :
see
> | refe
> | rence to class template instantiation 'std::_Tree<class JFPersistent
const
> | *,str
> | uct std::pair<class JFPersistent const * const,int>,struct
std::map<class
> | JFPers
> | istent co
> | nst *,int,struct std::less<class JFPersistent const *>,class
> | std::allocator<int>
> |  >::_Kfn,struct std::less<class JFPersistent const *>,class
> | std::allocator<int>
> | >' being compiled
> | fatal error C1063:
> |             ^^^^^|----------- MSDN Library tells this is stack overflow
> |
> | From MSDN:
> |
> | Fatal Error C1063
> | compiler limit : compiler stack overflow
> |
> | The program was too complex and caused the compiler stack to overflow.
> | This error may be a result of recursive includes.
> |
> | Have anybody faced this situation before ? I searched and found few
places
> | where ppl got it fixed with sp5. I installed sp5 quite some time back
and
> | also reinstalled after I got into this problem. Still its not fixed.
> |
> | Any help will be highly appriciated.
> |
> | Thanks in advance
> | Ashish

> Hi Ashish,

> Not this particular problem, but I've seen similar.

> Verify all headers are guarded (#ifndef, #define, #endif).
> Also, sometimes the header will bring in the .c/.cpp file. Verify that if
the
> header is bringing in the implementation, the .c/.cpp file is guarded.
This is
> sometimes required on template code.

> I tend to get lazy, and just #pragma once the files.

> Jeff



Wed, 27 Apr 2005 23:17:19 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. HTML help gives a stack overflow?

2. Stack Overflow Exception - VC 4.2 Bug?

3. Stack Structure and Stack Overflow for CE

4. Compiling a cpp file using the managed compiler !

5. Howto get VC to compile a *.cc file as a C++ file

6. How VC treats C and CPP files

7. Stack overflow exception

8. Stack Overflow

9. stack overflow help?

10. Stack overflow exception

11. catching c stack overflow

12. Stack Overflow in Form Width?

 

 
Powered by phpBB® Forum Software