Sign in to follow this  
darkzim

extern differs in levels of indirection from "unkown-type"???

Recommended Posts

Hi all, VC2003 is giving me this strange error about one of my extern classes "differing in levels of indirection from "unknown-type". I'm not sure what I did to cause the error [lol]. The only thing I've found regarding this was this (scroll to bottom) , but my error says I'm differing from "unkown-type". Does anyone know what might have caused this? Source is a little too large and spread out to post. Thanks.

Share this post


Link to post
Share on other sites
You probably have one too many or too few dereferences (*) or address-operators (&) somewhere. This causes the level of indirection to change. As an example, this error occurs here:

int p;
int* q = &p;
int** r = &p; // Different levels of indirection

Without knowing the type -- in the case where you use extern classes -- the error message becomes less descriptive. It is a compile error so you might just doubly click the message to move to the culprit piece of code.

Illco

Share this post


Link to post
Share on other sites
I can't find the piece of code that's causing the problem. I tried deleting the extern and all calls to it, but the same error is popping up all over the place now. I think it might be corrupted or something. Luckily I'm in a position to scrap the thing and start over. Thanks for your help though.

Share this post


Link to post
Share on other sites
Show us the code leading up to and including the line where the compiler error is generated. Perhaps then we can actually help you.

Share this post


Link to post
Share on other sites
Quote:

Show us the code leading up to and including the line where the compiler error is generated. Perhaps then we can actually help you.


Quoted for emphasis.

You did something wrong; nothing is "corrupted." (*)
Let us help you solve your problem. Scrapping a project and starting over because of a compiler error is not a solution; since you didn't figure out what was wrong in the first place, you are most likely going to make exactly the same mistake and, in the end, you'll be exactly where you are now except you'll have wasted more time rewriting the thing than you probably would have spent properly debugging it.


(*) Or rather, realistically, if your source files or compiler are actually somehow corrupted, you'll be getting errors like "unknown character in stream" or "internal compiler error." The chance that something is actually corrupted in exactly the right way as to have the compiler throw that particular error is unbelievably small.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this