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. Strange MFC Error on Comps

Strange MFC Error on Comps

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++tutorialquestion
10 Posts 4 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.
  • O Offline
    O Offline
    orcblood
    wrote on last edited by
    #1

    Okay, I made a simple MFC app that just opens and closes dialogs and all that :). However I have one small problem. I send it to someone else's comp and it gives them an error: A required .DLL file, MFC42D.DLL, was not found Anyone know why this is? Do I have to dig up this dll out of the MSVC++ folder and send it along with the program? Ive tried it on 3 different comps and eachone gives me the same error... Does anyone know how to fix this? Thanks, Ive never made a program with MFC before so maybe this is why its not working. orcblood

    F G 2 Replies Last reply
    0
    • O orcblood

      Okay, I made a simple MFC app that just opens and closes dialogs and all that :). However I have one small problem. I send it to someone else's comp and it gives them an error: A required .DLL file, MFC42D.DLL, was not found Anyone know why this is? Do I have to dig up this dll out of the MSVC++ folder and send it along with the program? Ive tried it on 3 different comps and eachone gives me the same error... Does anyone know how to fix this? Thanks, Ive never made a program with MFC before so maybe this is why its not working. orcblood

      F Offline
      F Offline
      Frank Deo
      wrote on last edited by
      #2

      You are distributing the debug version of your app. Rebuild it as "MFC Release" and re-distribute it. Frank

      O 1 Reply Last reply
      0
      • F Frank Deo

        You are distributing the debug version of your app. Rebuild it as "MFC Release" and re-distribute it. Frank

        O Offline
        O Offline
        orcblood
        wrote on last edited by
        #3

        How do I do that? Lol Im a newbie at it :). orcblood

        F 1 Reply Last reply
        0
        • O orcblood

          Okay, I made a simple MFC app that just opens and closes dialogs and all that :). However I have one small problem. I send it to someone else's comp and it gives them an error: A required .DLL file, MFC42D.DLL, was not found Anyone know why this is? Do I have to dig up this dll out of the MSVC++ folder and send it along with the program? Ive tried it on 3 different comps and eachone gives me the same error... Does anyone know how to fix this? Thanks, Ive never made a program with MFC before so maybe this is why its not working. orcblood

          G Offline
          G Offline
          Gary Kirkham
          wrote on last edited by
          #4

          The easiest thing to do is to go to the Project menu and select Settings.... Then go to the General tab and select the Use MFC in a Static Library option. Gary Kirkham A working Program is one that has only unobserved bugs I thought I wanted a career, turns out I just wanted paychecks

          O 1 Reply Last reply
          0
          • O orcblood

            How do I do that? Lol Im a newbie at it :). orcblood

            F Offline
            F Offline
            Frank Deo
            wrote on last edited by
            #5

            Build Menu -> Set Active Configuration -> Click Win32 Release -> ok -> rebuild All. Frank :-D

            1 Reply Last reply
            0
            • G Gary Kirkham

              The easiest thing to do is to go to the Project menu and select Settings.... Then go to the General tab and select the Use MFC in a Static Library option. Gary Kirkham A working Program is one that has only unobserved bugs I thought I wanted a career, turns out I just wanted paychecks

              O Offline
              O Offline
              orcblood
              wrote on last edited by
              #6

              It only has Use MFC in a Shared DLL option... orcblood

              O M 2 Replies Last reply
              0
              • O orcblood

                It only has Use MFC in a Shared DLL option... orcblood

                O Offline
                O Offline
                orcblood
                wrote on last edited by
                #7

                Okay, now it gives me two compiling errors: AVI PlayerDlg.obj : error LNK2001: unresolved external symbol _MCIWndCreateA Release/AVI Player.exe : fatal error LNK1120: 1 unresolved externals Thanks, I know mroe now lol. orcblood

                F 1 Reply Last reply
                0
                • O orcblood

                  Okay, now it gives me two compiling errors: AVI PlayerDlg.obj : error LNK2001: unresolved external symbol _MCIWndCreateA Release/AVI Player.exe : fatal error LNK1120: 1 unresolved externals Thanks, I know mroe now lol. orcblood

                  F Offline
                  F Offline
                  Frank Deo
                  wrote on last edited by
                  #8

                  You are getting this error because the linker doesnt know where to find the symbol _MCIWndCreateA. MSDN documentation says that MCIWndCreate function links to vfw32.lib. Try putting that in your linker options as a required library. Project -> Settings -> Select "Settings for: All Configurations" -> Link Tab Put "vfw32.lib" in the box for "object library modules". Then rebuild. Frank

                  O 1 Reply Last reply
                  0
                  • F Frank Deo

                    You are getting this error because the linker doesnt know where to find the symbol _MCIWndCreateA. MSDN documentation says that MCIWndCreate function links to vfw32.lib. Try putting that in your linker options as a required library. Project -> Settings -> Select "Settings for: All Configurations" -> Link Tab Put "vfw32.lib" in the box for "object library modules". Then rebuild. Frank

                    O Offline
                    O Offline
                    orcblood
                    wrote on last edited by
                    #9

                    Oh thank you soo much guys! It works now woohoo! It also works on other people's comps :). orcblood

                    1 Reply Last reply
                    0
                    • O orcblood

                      It only has Use MFC in a Shared DLL option... orcblood

                      M Offline
                      M Offline
                      Michael Dunn
                      wrote on last edited by
                      #10

                      orcblood wrote: It only has Use MFC in a Shared DLL option... You have the learning edition of VC (or whatever it's called, I forget the exact name) which doesn't let you link statically with MFC. But as you've found out, most folks have mfc42.dll already, so your release version works. --Mike-- PROCRASTINATION: Hard work often pays off after time, but laziness always pays off now. BUY MY SOFTWARE!! (please?) RightClick-Encrypt - file encryption w/Explorer plugins | 1ClickPicGrabber - web page picture grabber for IE My IntarWeb Homepgae!!!11

                      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