Jump to content
  • Advertisement
Sign in to follow this  
darkzim

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

This topic is 4540 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!