Linker Error

This is a discussion on Linker Error within the C++ Programming forums, part of the General Programming Boards category; I'm getting this linker error in MSVC++ 2008 1>LINK : fatal error LNK1104: cannot open file 'msvcprtd.lib' I know what ...

  1. #1
    Registered User
    Join Date
    Jun 2008
    Posts
    127

    Linker Error

    I'm getting this linker error in MSVC++ 2008
    1>LINK : fatal error LNK1104: cannot open file 'msvcprtd.lib'
    I know what it means, I just can't figure out how to get the library back.
    I might have accidently removed it(did).

  2. #2
    The Richness... Richie T's Avatar
    Join Date
    Jan 2006
    Location
    Ireland
    Posts
    469
    Post some code - I doubt that the problem is with missing library files unless you were foolish enough to go deleting stuff in the compiler's directories. If you did, the easiest way to fix it is probably a reinstall of your compiler.
    No No's:
    fflush (stdin); gets (); void main ();


    Goodies:
    Example of fgets (); The FAQ, C/C++ Reference


    My Gear:
    OS - Windows XP
    IDE - MS Visual C++ 2008 Express Edition


    ASCII stupid question, get a stupid ANSI

  3. #3
    Registered User
    Join Date
    Jun 2008
    Posts
    127
    The code is irrelevant. The error is always there.

  4. #4
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    Well, then: were you so foolish as to go deleting stuff in the compiler directories? msvcprtd.lib is the standard C++ library in debug DLL version. You can delete/reinstall to try to get it back, I suppose (if it's not in your recycle bin or undelete et cetera), or don't use debug anymore.

  5. #5
    Registered User
    Join Date
    Jun 2008
    Posts
    127
    I just removed it, didn't actually delete it. Also, I switched to realease, rebuilt the project and I still got the same error.

  6. #6
    Registered User
    Join Date
    Jun 2008
    Posts
    127
    Nvm. I'll just reinstall.

  7. #7
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    Tell us exactly what you did (because while you may think you mean something when you say "I just removed it, didn't actually delete it", I'm pretty sure you don't).

  8. #8
    Registered User
    Join Date
    Jun 2008
    Posts
    127
    I tried reinstalling and the error is still there.
    I wen't to tools>options>VC++ Directories and tried adding a new directory for the sfml libraries. I tried it once then realized it was wrong. When I went back I clicked on the removed button accidently twice. There are a bunch of other standard directories there and it was problaby one of those.
    Last edited by herWter; 08-09-2008 at 08:32 PM.

  9. #9
    Registered User
    Join Date
    Jun 2008
    Posts
    127
    New info I just noticed::I looked in the standard for libraries and sure enough there was that file. For some reason the compiler is not detecting it. It might be the directory path I REMOVED and NOT DELETED.

  10. #10
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    Then: find whatever directory your .lib file lives in, and put it back in the include list.

  11. #11
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    the lib list, not the include list. the include list is for include files.

  12. #12
    Registered User
    Join Date
    Jun 2008
    Posts
    127
    Ok. It's not what was originally there but it will work. Thanks.

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, 02:29 PM
  2. Crazy errors caused by class, never seen before..
    By Shamino in forum C++ Programming
    Replies: 2
    Last Post: 06-10-2007, 12:54 PM
  3. Please Help - Problem with Compilers
    By toonlover in forum C++ Programming
    Replies: 5
    Last Post: 07-23-2005, 11: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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21