Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. MFC DLL Distribution Question

MFC DLL Distribution Question

Scheduled Pinned Locked Moved C / C++ / MFC
c++questiontutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    John Clump
    wrote on last edited by
    #1

    Hello everyone, I have a question about how to distribute the MFC DLLs with an application. I have read elsewhere how to distribute the MFC DLLs and which ones I need using Dependency Walker. I have code that properly installs the DLLs, which I believe are for all Windows versions, but I am unsure whether this is the best way to do it under Windows 2000 and XP. Instead of installing the DLLs into the system folder etc., should I put the DLLs in the application's folder along with a .local file? Or should I go ahead and install them into the system as usual for Win95/98/Me etc? Also, I have Visual C++ Professional, and could statically link to the DLLs. Is there any disadvantage to statically linking to the DLLs, instead of dynamically and having to install the MFC DLLs? Are there times when I should dynamically link, and times I should statically link? (assuming I am running VC++ professional)?

    H 1 Reply Last reply
    0
    • J John Clump

      Hello everyone, I have a question about how to distribute the MFC DLLs with an application. I have read elsewhere how to distribute the MFC DLLs and which ones I need using Dependency Walker. I have code that properly installs the DLLs, which I believe are for all Windows versions, but I am unsure whether this is the best way to do it under Windows 2000 and XP. Instead of installing the DLLs into the system folder etc., should I put the DLLs in the application's folder along with a .local file? Or should I go ahead and install them into the system as usual for Win95/98/Me etc? Also, I have Visual C++ Professional, and could statically link to the DLLs. Is there any disadvantage to statically linking to the DLLs, instead of dynamically and having to install the MFC DLLs? Are there times when I should dynamically link, and times I should statically link? (assuming I am running VC++ professional)?

      H Offline
      H Offline
      HPSI
      wrote on last edited by
      #2

      At some point, redistributing the MFC DLLs is going to cause you and your customers problems. Putting them in the system directory is a crash waiting to happen. How do you know someone else won't come along, and replace your DLLs with another version? If you absolutely have to redistribute them, then put them in the app's directory. Otherwise, you should prepare yourself for customer reports like "I just installed your app, and now this other app doesn't work." A far better approach is to statically link. This way, you know your app will work, regardless of what's on your customer's machine. And you also know you won't be impacting other apps. You're trading program size for program stability. Your app will exist long after you have stopped working on it. Do you really want somebody to install your app 10 years from now, and step on some DLLs that another program relies on? HPS HwndSpy - GUI developer's aid to visually locate and inspect windows. For the month of August only, use coupon code CP-81239 for 30% off.

      D 1 Reply Last reply
      0
      • H HPSI

        At some point, redistributing the MFC DLLs is going to cause you and your customers problems. Putting them in the system directory is a crash waiting to happen. How do you know someone else won't come along, and replace your DLLs with another version? If you absolutely have to redistribute them, then put them in the app's directory. Otherwise, you should prepare yourself for customer reports like "I just installed your app, and now this other app doesn't work." A far better approach is to statically link. This way, you know your app will work, regardless of what's on your customer's machine. And you also know you won't be impacting other apps. You're trading program size for program stability. Your app will exist long after you have stopped working on it. Do you really want somebody to install your app 10 years from now, and step on some DLLs that another program relies on? HPS HwndSpy - GUI developer's aid to visually locate and inspect windows. For the month of August only, use coupon code CP-81239 for 30% off.

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        HPSI wrote: At some point, redistributing the MFC DLLs is going to cause you and your customers problems. Putting them in the system directory is a crash waiting to happen. How do you know someone else won't come along, and replace your DLLs with another version? If you absolutely have to redistribute them, then put them in the app's directory. Otherwise, you should prepare yourself for customer reports like "I just installed your app, and now this other app doesn't work." Agreed!

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups