[Compiler limit : linkage specifications nested too deeply] : How tosolve this one?

E

eminemence

Hi all,
I am getting this strange and nearly unsolvable error in VS 6.
The project has some thousands of files,so adding some code sample
here is out of question.
I have checked on the extern "C" bracket completion on most of the
files possible.
Can someone who has faced this problem earlier,share their solutions?
Thanks in advance.
 
S

Sarath

Hi all,
I am getting this strange and nearly unsolvable error in VS 6.
The project has some thousands of files,so adding some code sample
here is out of question.
I have checked on the extern "C" bracket completion on most of the
files possible.
Can someone who has faced this problem earlier,share their solutions?
Thanks in advance.

What's the error you've got?
 
R

Richard Herring

In message

[Please don't top-post - response moved to its proper place]
fatal error C1045: compiler limit : linkage specifications nested too
deeply

Well, that's clear enough. Typing that phrase into Google yields this
explanation:

(http://msdn2.microsoft.com/en-us/library/aa229004(VS.60).aspx)

"The nesting of externals exceeded the capacity of the compiler. Nested
externals are allowed when specifying the external linkage type (such as
extern C++).

Make sure that nested externals have appropriate closing braces."



In other words, what the compiler is seeing is this:

extern "C" {
extern "C" {
extern "C" {
extern "C" {
// ...declarations
}
}
}
}

instead of this:

extern "C" {
//
}
extern "C" {
//
}
extern "C" {
//
}
extern "C" {
//
}
//...

I'd guess that your 'extern "C" bracket completion' (whatever that is)
is probably in the wrong place in your headers relative to the nested
#includes, so it's wrapping around more code than you intended.
 
T

Tim Slattery

eminemence said:
Hi all,
I am getting this strange and nearly unsolvable error in VS 6.
The project has some thousands of files,so adding some code sample
here is out of question.

You need folks who know the Visual C++ compiler. They hang out in the
microsoft.public.vc.* hierarchy. You might start with
microsoft.public.vc.ide_general
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top