|
Why is this "unresolved?" |
GameCreator
Member #2,541
July 2002
|
From graphics.cpp
From graphics.h
The above generates the following error from Visual Studio I've also attached the entire graphics.cpp and graphics.h files as they stand right now, should anyone want to see more. Can anyone please let me know why that error comes up? It seems very mysterious to me, as the .h file is included and the thing is global. Oh, and I looked up the Microsoft help for that error. It says this code should generate that error as well, but I don't know why either. // LNK2019.cpp // LNK2019 expected extern char B[100]; // B is not in avilable to the linker int main() { B[0] = ' '; } (Yes, that misspelling was part of it.) Why would B not be available to the linker? It's right there. I know, that's simplistic reasoning but at this point I just don't understand this. I've tried removing extern, I've tried moving the declaration to the .cpp file. All with no luck. Thanks for any help. Edit: Thanks X-G. File now uploaded.
|
X-G
Member #856
December 2000
|
Quote: I've also attached the entire graphics.cpp and graphics.h No you haven't. Besides, your problem is that you haven't defined undead for real anywhere, just an extern declaration. -- |
GameCreator
Member #2,541
July 2002
|
Got it. Added Thanks!
|
|