1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

fatal error LNK1104: cannot open file 'mfc42d.lib'

Discussion in 'MFC' started by Davekenny, Jul 11, 2006.

  1. Davekenny

    Davekenny New Member

    Joined:
    Jul 11, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    fatal error LNK1104: cannot open file 'mfc42d.lib'

    I need to edit a program.
    The source code is in Microsoft Visual C++.

    So I tried express edition, and I get this error.

    After searching forums I found out that I needed the full professional edition.

    So I ordered the 90 Day Trial of Visual Studios 2005 Professional Edition.

    After installing(FULL install), I ran, and wow! same error!

    I've downloaded SDKs but all they have is 64 bit mfc42d.lib files, which if I use it just gives me a compatability error. I need the 32bit/x86 junks.

    Anyone know how to fix this, or where to find this file? It's not on the computer or DVD, I've searched.

    I'm so stuck >_<

    Thank You,
    Dave :confused:
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,283
    Likes Received:
    364
    Trophy Points:
    83
    'mfc42d.lib' comes with Vidual studio 6 and will be located in C:\Program Files\Microsoft Visual Studio\VC98\MFC\Lib assuming Microsoft Visual Studio is installed at C:\Program Files\Microsoft Visual Studio. All you need to do is link to the lib and the problem should get resolved. With 2005 VS MFC80D.dll comes and not 42D.dll
     
  3. Davekenny

    Davekenny New Member

    Joined:
    Jul 11, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    I do have an MFC80D.dll, but I have no idea how to link it or where to put it? :confused:
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,283
    Likes Received:
    364
    Trophy Points:
    83
    Do you have Visual studio 6. If not get that and you will get the MFC42D.dll or try importing the source code from VS6 to VS8.

    To link to a particular DLL you need to specify the path in the Lib directories.
     
  5. arsen_lupen

    arsen_lupen New Member

    Joined:
    Sep 15, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Installing VC 6.00 and linking with its library doesn't work. I think there are dependences for this lib.

    the Comment above is invalid.

    Note to have succed you should use the include files from VC 6.00, not this one from the SDK 8.0 .
     
    Last edited: Sep 15, 2006
  6. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,283
    Likes Received:
    364
    Trophy Points:
    83
    The include will work at compile time and not at linking time.
     
  7. arsen_lupen

    arsen_lupen New Member

    Joined:
    Sep 15, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Yes, you are right. The incllude file can be and from the new SDK. Sorry for the mistake in the previous comment.
     

Share This Page