Thread: Linker Error?

  1. #1
    Student drdroid's Avatar
    Join Date
    Feb 2002
    Location
    Montreal, Quebec
    Posts
    669

    Question Linker Error?

    Ok, here's cortana in her latest state... not impressive. Well I'm now getting linker errors with her... why, why cppprogramminggod, why?!!? Anybody now what's wrong?

  2. #2
    Registered User
    Join Date
    Sep 2002
    Posts
    1,640
    Change those function return types Salem showed, And change
    in "cort.h" <iostream.h> to <iostream> and <fstream.h> to
    <fstream>.
    --

  3. #3
    Student drdroid's Avatar
    Join Date
    Feb 2002
    Location
    Montreal, Quebec
    Posts
    669

    Rply:

    Ok, so I did those things. I still get the exact same errors. Did these changes actually work for you? And I've now gotten rid of the .h for a couple programs now, by the advice of people, what does this do? Any other suggestions?

  4. #4
    Registered User
    Join Date
    Sep 2002
    Posts
    1,640
    <iostream.h> is old, To replace it and still have backward
    compatibility they named the new iostream to <iostream>,
    Same with fstream, What linking errors do you get?
    --

  5. #5
    Student drdroid's Avatar
    Join Date
    Feb 2002
    Location
    Montreal, Quebec
    Posts
    669

    Talking ...

    I'm using Visual C++ 6.0, the errors I'm getting are:

    Code:
    main.obj : error LNK2001: unresolved external symbol "public: void __thiscall cortana::find_names(void)" (?find_names@cortana@@QAEXXZ)
    Debug/Cortana.exe : fatal error LNK1120: 1 unresolved externals

  6. #6
    Registered User
    Join Date
    Sep 2002
    Posts
    1,640
    Are you sure you included "funcdef.cpp" in your project?
    Because the linker can't find the function.
    --

  7. #7
    Student drdroid's Avatar
    Join Date
    Feb 2002
    Location
    Montreal, Quebec
    Posts
    669

    ...

    vc++ has them linked as a project, but I'll try that. Hmmm... that seems to screw the program more... Now functiondef.cpp can't sense the header file. I don't think old bessy likes cortana.

  8. #8
    I lurk
    Join Date
    Aug 2002
    Posts
    1,361
    Build->Clean
    Build->Rebuild All

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Errors including <windows.h>
    By jw232 in forum Windows Programming
    Replies: 4
    Last Post: 07-29-2008, 01:29 PM
  2. Crazy errors caused by class, never seen before..
    By Shamino in forum C++ Programming
    Replies: 2
    Last Post: 06-10-2007, 11:54 AM
  3. Please Help - Problem with Compilers
    By toonlover in forum C++ Programming
    Replies: 5
    Last Post: 07-23-2005, 10:03 AM
  4. pointer to array of objects of struct
    By undisputed007 in forum C++ Programming
    Replies: 12
    Last Post: 03-02-2004, 04:49 AM
  5. Linking error
    By DockyD in forum C++ Programming
    Replies: 10
    Last Post: 01-20-2003, 05:27 AM