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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Use MFC in....

Use MFC in....

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++
4 Posts 4 Posters 3 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.
  • H Offline
    H Offline
    himuskanhere
    wrote on last edited by
    #1

    :cool:Whats the difference between Use Mfc in Static Library and Use Mfc in Shared Dll. what is achieved after specifing either of thses two? Thanks in advance.... :cool:

    N I 2 Replies Last reply
    0
    • H himuskanhere

      :cool:Whats the difference between Use Mfc in Static Library and Use Mfc in Shared Dll. what is achieved after specifing either of thses two? Thanks in advance.... :cool:

      N Offline
      N Offline
      nbugalia
      wrote on last edited by
      #2

      The shared dll option will use the existing mfc dlls on the machine on which execution is going on. If you don't have the dlls it wont' execute. The static library option will attach the code of mfc dlls in you executable so you will not need the dlls. But the drawback of static linking is that the overall size of executable will be increased.

      1 Reply Last reply
      0
      • H himuskanhere

        :cool:Whats the difference between Use Mfc in Static Library and Use Mfc in Shared Dll. what is achieved after specifing either of thses two? Thanks in advance.... :cool:

        I Offline
        I Offline
        Iain Clarke Warrior Programmer
        wrote on last edited by
        #3

        While the static library name may be hard to understand, the "shared dll" bit should be easier! An EXE is the program you're running. It can also use DLLs, which other EXEs can use - hence shared DLLs. If you're struggling with that idea, then this is not the right forum for you. In this case, your program will reference the MFC DLL(s). This could be MFC42U.dll for example. But this may or may not be on a system, so you'd need to put it there - and what if a bad person overwrites it? And is it will contain every MFC class and code, it will be quite large. The alternative is to link all the MFC functions into your EXE. It will now be larger than before, but more selfcontained. And not as large as the EXE and DLL were before. Which you use is heaviliy dependent on other conditions. Ease of install, whether the DLLs already exist on the system (which is a given with older versions of MFC). Will this be downloaded over a slow internet connection? etc. There is no black or white, good or bad answer. Welcome to programming - land of compromises and cost-benefit analysis. Iain.

        D 1 Reply Last reply
        0
        • I Iain Clarke Warrior Programmer

          While the static library name may be hard to understand, the "shared dll" bit should be easier! An EXE is the program you're running. It can also use DLLs, which other EXEs can use - hence shared DLLs. If you're struggling with that idea, then this is not the right forum for you. In this case, your program will reference the MFC DLL(s). This could be MFC42U.dll for example. But this may or may not be on a system, so you'd need to put it there - and what if a bad person overwrites it? And is it will contain every MFC class and code, it will be quite large. The alternative is to link all the MFC functions into your EXE. It will now be larger than before, but more selfcontained. And not as large as the EXE and DLL were before. Which you use is heaviliy dependent on other conditions. Ease of install, whether the DLLs already exist on the system (which is a given with older versions of MFC). Will this be downloaded over a slow internet connection? etc. There is no black or white, good or bad answer. Welcome to programming - land of compromises and cost-benefit analysis. Iain.

          D Offline
          D Offline
          ddspliting
          wrote on last edited by
          #4

          i would use shared DLL usually but the main problem which i faced as an AMATUER programmer was tht my program wont run on my friend system! so static DLL helped me out! though the size of the exe incresed to few MBytes but atleast i got STANDALONE application ;P

          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