Thread: Compiler Error Message

  1. #1
    C++ Learner :D
    Join Date
    Mar 2004
    Posts
    69

    Compiler Error Message

    Im creating a console app in MS VC++ 6, when I compile I get the following error message:

    Linking...
    user_pword.obj : error LNK2001: unresolved external symbol "void __cdecl set_details(void)" (?set_details@@YAXXZ)
    Debug/user_pword.exe : fatal error LNK1120: 1 unresolved externals
    any ideas what ive done wrong?

    do you need to see the code?

    Thanks for any help

  2. #2
    Registered User
    Join Date
    Oct 2004
    Posts
    25
    I got the same error:P but not with (void). I had (int) and needed (int&).. but since its void.. maby you are using some function 2 times in tha same porgram.. but then again Im still a newbie:P

  3. #3
    C++ Learner :D
    Join Date
    Mar 2004
    Posts
    69
    Quote Originally Posted by boozy
    I got the same error:P but not with (void). I had (int) and needed (int&).. but since its void.. maby you are using some function 2 times in tha same porgram.. but then again Im still a newbie:P
    that doesnt make much sense :s because you can use functions over and over...

  4. #4
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    You probably need to link with whatever library contains 'set_details'. This should be described in your compiler documentation: error LNK2001.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  5. #5
    Registered User
    Join Date
    Oct 2004
    Posts
    25
    but if you have 2 functions called the same:P but never mind me

  6. #6
    Registered User
    Join Date
    Mar 2002
    Posts
    1,595
    If Ken Fitlike's post doesn't correct the problem, then I suspect set_details() may be a member in a class. If so, and other class methods work well, then I suspect that there is a discrepancy in the way the function is declared/defined/called with a typo in one or the other. Posting the class declaration, the method definition, and the function call, if any.

  7. #7
    C++ Learner :D
    Join Date
    Mar 2004
    Posts
    69
    Thanks for your responses Ken Fitlike & elad ive fixed the problem, it was simple typo

    sorry for wasting your time!
    Last edited by explosive; 11-04-2004 at 06:43 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 01:30 PM
  2. Compiler Paths...
    By Cobra in forum C++ Programming
    Replies: 5
    Last Post: 09-26-2006, 04:04 AM
  3. C Compiler and stuff
    By pal1ndr0me in forum C Programming
    Replies: 10
    Last Post: 07-21-2006, 11:07 AM
  4. I can't get this new compiler to work.
    By Loduwijk in forum C++ Programming
    Replies: 7
    Last Post: 03-29-2006, 06:42 AM
  5. how to call a compiler?
    By castlelight in forum C Programming
    Replies: 3
    Last Post: 11-22-2005, 11:28 AM