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

Thread: link/build app

  1. #1
    Join Date
    Feb 2013
    Posts
    22

    link/build app

    when I linked my mfc single document app to a 3rd static library, in debug mode it gave LNK 2005 errors. In debug when I switched the run time flag to /MD it gave me couple of NODEFAULTLIB:library warnings only. In release mode and /MD, no warnings or errors. Are these ok?. the debug with /MD still work?. why it behave like this?.

  2. #2
    Join Date
    Jun 2002
    Location
    Stockholm, Sweden
    Posts
    1,641

    Re: link/build app

    The reason you are getting the error without the /MD is probably that the library you downloaded is of "multithreaded dll" type. This is fine and will not give you any problems.

    However, what you may want to do is to try find a static library so that you don't have to include the third-party dll when you deploy your app. It all depends on what you want, in some cases having the separate dll is preferred because the user can then swap it with another dll.
    Nobody cares how it works as long as it works

  3. #3
    Join Date
    Feb 2013
    Posts
    22

    Re: link/build app

    ok, you mean the fact that in debug mode with RT option /MD, with couple of warnings only, is ok and will not give me problems.
    In release mode and /MD, this should be fine then, I do not get any warning or errors.
    Sorry, I did not get this part right, Could you explain more?.
    "However, what you may want to do is to try find a static library so that you don't have to include the third-party dll when you
    deploy your app. It all depends on what you want, in some cases having the separate dll is preferred because the user can then
    swap it with another dll."

  4. #4
    Join Date
    Jun 2002
    Location
    Stockholm, Sweden
    Posts
    1,641

    Re: link/build app

    Sorry, I did not read your original post carefully enough. If your 3rd party library is static already, you can ignore the warnings and forget the rest that I said.
    Nobody cares how it works as long as it works

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