CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Linker Question

  1. #1
    Join Date
    Mar 2004
    Posts
    119

    Linker Question

    I just installed a fresh copy of Windows 7 and I figured while I was upgrading I might as well take the opportunity to also switch from VS2005 to vs2008. However when I try to build my app I get a linker error...

    Error 528 fatal error LNK1104: cannot open file 'mfc80d.lib'

    I did some research and it turns out this is because I'm linking to a 3rd party DLL and the lib file they provide was built with vs2005. I talked to the vendor and they said that they have no plans to upgrade to vs2008 so there is no chance for me to get a vs2008 built lib.

    Is there any way around this? Are there any ramifications for having mixed code like this for the release build?

    I'd rather not go back to vs2005 if I don't have to because I remember what a pain it was getting it to run correctly under Vista and I don't want to hassle with that again if I don't have to.

    Thanks,
    Dan

  2. #2
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Linker Question

    Quote Originally Posted by Dan203 View Post
    I did some research and it turns out this is because I'm linking to a 3rd party DLL and the lib file they provide was built with vs2005.
    Are you talking about an import library, or static library? If it's an import library, then there should not have been a problem. If it's a static library, then you're in trouble.
    I talked to the vendor and they said that they have no plans to upgrade to vs2008 so there is no chance for me to get a vs2008 built lib.
    This is a foolish decision on their part. Programmers are going to use VS 2008, and all they will be doing with that stance is upsetting their current (and potential future) customers.
    Is there any way around this? Are there any ramifications for having mixed code like this for the release build?
    First, you need to clear up the confusion in your post by specifiying whether the library file is an import library or static library. They are two vastly different things, even though they both have a .lib extension.

    And you can get around any DLL without an import library by calling LoadLibrary() and GetProcAddress() at runtime to get the functions you need from the library.

    Regards,

    Paul McKenzie

  3. #3
    Join Date
    Mar 2004
    Posts
    119

    Re: Linker Question

    You're right it's not a DLL it's a static library. So I guess I'm SOL.

    Oh well back to vs2005 it is.

    Dan

  4. #4
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Linker Question

    Quote Originally Posted by Dan203 View Post
    You're right it's not a DLL it's a static library. So I guess I'm SOL.

    Oh well back to vs2005 it is.

    Dan
    Do they have source code? If they do, maybe you can recompile it?

    Since it is a static library, I'm am surprised that they are not going to compile it using a compiler that new programmers will be using. Is this library free of charge, or is it commercial? If it's a commercial library, then that's more of a reason that they're very foolish not creating a VS 2008 version.

    Regards,

    Paul McKenzie

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured