Thread: mfc420d.dll

  1. #1
    Registered User
    Join Date
    Mar 2002
    Posts
    88

    mfc420d.dll

    I Programmed a Program ... it works ok
    but if i give it to some one else ...
    he cant open the program (the EXE)
    it ask for mfc420d.dll

    i made a search... and i am not found this file ?
    what can i do
    ?

  2. #2
    Registered User
    Join Date
    Apr 2003
    Posts
    52
    Hi, I too have run into this problem, searching around MSDN, I have been unable to really find what I am looking for. Is there a way to pack all the dll's into the main exe so you don't have to give multiple dll files to anyone who wants to run your program? If you could place a link or explain how in visual c++ 6, that would be great! thanks

  3. #3
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    Project -> Settings -> General -> Microsoft Foundation Classes: "Use MFC in a Static Library"
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  4. #4
    Registered User
    Join Date
    Mar 2002
    Posts
    88
    Originally posted by XSquared
    Project -> Settings -> General -> Microsoft Foundation Classes: "Use MFC in a Static Library"
    I dont Have This Option, i have only
    Use MFC in Sared DLL's

    but now i made a relase, not tehe debug
    and its works

  5. #5
    IAmRegistered
    Guest
    where are the project settings in visual studio .net? I tried looking for them but couldnt find them the other day

  6. #6
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    In the project view (the tree view), right-click the project and select properties.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  7. #7
    Magically delicious LuckY's Avatar
    Join Date
    Oct 2001
    Posts
    856
    Originally posted by XSquared
    Project -> Settings -> General -> Microsoft Foundation Classes: "Use MFC in a Static Library"
    Is that how you're supposed to fix that mfc42d.dll problem??? I'm glad you asked this question, GodLike, because I encountered the same problem and ended up just installing the missing DLLs on the other box...
    I just tried compiling with "Static Library" instead of shared, but now I have a link error because nafxcw.lib is not found... Did you ever have this problem XSquared? Do you know how to resolve it? Is it as simple as maybe copying the file from the CD? hmmm...

  8. #8
    Magically delicious LuckY's Avatar
    Join Date
    Oct 2001
    Posts
    856
    Learning Edition's Custom AppWizard Can Generate Fatal Link Error LNK1104

    Custom AppWizard allows you to create custom appwizards that rely on the MFC Static Libraries. The MFC Static Libraries are included only in the Professional and Enterprise Editions of Visual C++. Attempting to use the MFC Static Libraries in the Learning Edition will result in a fatal link error LNK1104 on one or more of the following libraries:

    - nafxcw.lib
    - nafxcwd.lib
    - uafxcw.lib
    - uafxcwd.lib
    - nafxis.lib
    - nafxisd.lib
    The reason I keep getting this error is that I have the Learning Edition of MSVC 5.0
    Ugh... I really don't want to fork out the cash for 6.0 (professional or enterprise edition).. What am I to do? I wish I could easily (and cheaply) upgrade to 6.0.... Ugh.

    Anyone want to email me a copy? Thanks.
    Last edited by LuckY; 05-12-2003 at 08:42 PM.

  9. #9
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Code:
    Is that how you're supposed to fix that mfc42d.dll problem???
    No, the problem you really have is that you try to distribute the debug version of the app, which requires the debug version of the MFC dll.
    Compile as "Release" and distribute that file.

    Of course you don't have the legal right to distribute any file.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  10. #10
    Magically delicious LuckY's Avatar
    Join Date
    Oct 2001
    Posts
    856
    Originally posted by CornedBee
    No, the problem you really have is that you try to distribute the debug version of the app, which requires the debug version of the MFC dll.
    Compile as "Release" and distribute that file.

    Of course you don't have the legal right to distribute any file.
    Are you saying that building using MFC in a static DLL does not fix the problem of someone trying to run an app without the MFC libraries?

    Actually, if I recall correctly (this was about 3 months ago), I did in fact build in release. I don't remember the actual dlls that were missing (they might not have been the *d.dll files)... Eh. Either way, I just downloaded MS Visual Studio 6 Enterprise Edition last night, so my CString incompatibility and my learning edition limitations are behind me (buddha-willing)...

    Hey anyone have a copy of DWMAPI32.lib in your VisualC\lib directory you can zip up and email me? The one in the zip I downloaded was corrupted (or some such thing) noting a CRC error...

  11. #11
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    Originally posted by LuckY
    Are you saying that building using MFC in a static DLL does not fix the problem of someone trying to run an app without the MFC libraries?
    There's a difference between static linking of the libraries and with the option to tell the compiler to create a release build (optimised without the extra burden of the debug code). The static linking option allows you to not worry about the MFC dlls when redistributing, but is only available in VC++ Pro or above

    Originally posted by LuckY
    Hey anyone have a copy of DWMAPI32.lib in your VisualC\lib directory you can zip up and email me? The one in the zip I downloaded was corrupted (or some such thing) noting a CRC error...
    Doesnt the disk for VC++ have this? Cant you reinstall?
    If not, it should be part of one of the SDK (Maybe the platform sdk) available free from MSDN

  12. #12
    Magically delicious LuckY's Avatar
    Join Date
    Oct 2001
    Posts
    856
    Originally posted by Fordy
    There's a difference between static linking of the libraries and with the option to tell the compiler to create a release build
    I appreciate your restating it, but I was already aware of your point. I was just trying to make another point. CornedBee said that statically linking to MFC was not required to run an app on a box that doesn't have MFC libraries; he said you just have to distribute a release build as opposed to a debug build which very obviously has nothing to do with the MFC libraries. Side note: Is VC++ enterprise "above" the pro version? Just curious because static MFC linking is available to both.
    Doesnt the disk for VC++ have this? Cant you reinstall?
    If not, it should be part of one of the SDK (Maybe the platform sdk) available free from MSDN
    Actually, I don't have an actual disk. As I previously stated, I downloaded MS VisualStudio 6 last night and that file in the zip was corrupt or some such thing... You did point something out to me though; it may be on my old-fashioned MSVC 5.0 disk that I do have. I'll have to check that out when I get home.

  13. #13
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Pro and Enterprise are different versions.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  14. #14
    Magically delicious LuckY's Avatar
    Join Date
    Oct 2001
    Posts
    856
    Originally posted by CornedBee
    Pro and Enterprise are different versions.
    Gee, really? Yeah, I know that cornedbeef. Fordy said "only available in VC++ Pro or above." I just asked if Enterprise is "above" Pro or if Pro is "above" Enterprise, you sociopath.

  15. #15
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,138
    Wow, that was totally uncalled for. But, yes, enterprise is more expensive and feature-filled than pro.

Popular pages Recent additions subscribe to a feed