strange sudden error
-
I've been making a program, and its been executing fine. But all of a sudden, it gave me this error (even though I didn't change anything): --------------------Configuration: TestGL - Win32 Debug-------------------- Linking... TestGLView.obj : error LNK2001: unresolved external symbol "public: __thiscall CColour::CColour(class CWnd *)" (??0CColour@@QAE@PAVCWnd@@@Z) Debug/TestGL.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. TestGL.exe - 2 error(s), 0 warning(s) I've had these types of errors (which i don't understand) before and usually if I reboot the computer its fine. But this time, its not going away. What does this error mean and how can I fix it? Also, when I double click the error, it doesn't take me to the spot in the file where the error is.
-
I've been making a program, and its been executing fine. But all of a sudden, it gave me this error (even though I didn't change anything): --------------------Configuration: TestGL - Win32 Debug-------------------- Linking... TestGLView.obj : error LNK2001: unresolved external symbol "public: __thiscall CColour::CColour(class CWnd *)" (??0CColour@@QAE@PAVCWnd@@@Z) Debug/TestGL.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. TestGL.exe - 2 error(s), 0 warning(s) I've had these types of errors (which i don't understand) before and usually if I reboot the computer its fine. But this time, its not going away. What does this error mean and how can I fix it? Also, when I double click the error, it doesn't take me to the spot in the file where the error is.
Somehow the linker is not finding the definition for the
CColour
constructor referred to. Possible reasons:- The definition is actually lacking.
- The definition is in some file that is not being linked (maybe you deleted from the project accidentally).
- Sometimes the precompiled headers feature makes funny thing and a "Rebuild all" drives it back to sanity.
Joaquín M López Muñoz Telefónica, Investigación y Desarrollo
-
I've been making a program, and its been executing fine. But all of a sudden, it gave me this error (even though I didn't change anything): --------------------Configuration: TestGL - Win32 Debug-------------------- Linking... TestGLView.obj : error LNK2001: unresolved external symbol "public: __thiscall CColour::CColour(class CWnd *)" (??0CColour@@QAE@PAVCWnd@@@Z) Debug/TestGL.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. TestGL.exe - 2 error(s), 0 warning(s) I've had these types of errors (which i don't understand) before and usually if I reboot the computer its fine. But this time, its not going away. What does this error mean and how can I fix it? Also, when I double click the error, it doesn't take me to the spot in the file where the error is.
First thing would be to do a rebuild all. If that doesn't help then for some reason the CPP file that contains the definition for CColour isn't being included in the link or isn't being defined. See if it has been removed from the project. Tim Smith I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?