Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. strange sudden error

strange sudden error

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestiondebuggingworkspace
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rajveer
    wrote on last edited by
    #1

    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.

    J T 2 Replies Last reply
    0
    • R Rajveer

      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.

      J Offline
      J Offline
      Joaquin M Lopez Munoz
      wrote on last edited by
      #2

      Somehow the linker is not finding the definition for the CColour constructor referred to. Possible reasons:

      1. The definition is actually lacking.
      2. The definition is in some file that is not being linked (maybe you deleted from the project accidentally).
      3. 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

      1 Reply Last reply
      0
      • R Rajveer

        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.

        T Offline
        T Offline
        Tim Smith
        wrote on last edited by
        #3

        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?

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups