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. How to make an exe

How to make an exe

Scheduled Pinned Locked Moved C / C++ / MFC
helpcsharpc++visual-studiodebugging
20 Posts 9 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.
  • N Nibu babu thomas

    tejaswini.g wrote:

    I took the exe file and placed in another system in which there is no visual studio software.when I tried to run the exe file I got the error saying that there is no MFC42D.DLL , c:\WINNT\system32;..........

    This means your exe is dependent on these modules. You exe will need these dlls to run. So you will have to ship the corresponding dlls with your exe. You can use dependency walker to find out what all dlls your exe is dependent on.


    Nibu thomas A Developer Programming tips[^]  My site[^]

    V Offline
    V Offline
    vc _fragrance
    wrote on last edited by
    #7

    Thank you. Sorry ,I don't know how to use dependency walker. Can u say how to use dependency walker.

    N V H 3 Replies Last reply
    0
    • V vc _fragrance

      Hi, I have created an application using mfc and I got the exe in debug folder. I took the exe file and placed in another system in which there is no visual studio software.when I tried to run the exe file I got the error saying that there is no MFC42D.DLL , c:\WINNT\system32;.......... How can I rectify this problem and run the exe file. Can u Plz help me. Thanks in advance.

      T Offline
      T Offline
      toxcct
      wrote on last edited by
      #8

      the other guys already answered. but i see one important thing though. don't distribute a program compiled in debug mode ! compile in release mode to deliver it... then, for each DLL missing, find them on your computer and provide them with your exe.


      TOXCCT >>> GEII power

      [VisualCalc 3.0  updated ][Flags Beginner's Guide  new! ]

      1 Reply Last reply
      0
      • V vc _fragrance

        Thank you. Sorry ,I don't know how to use dependency walker. Can u say how to use dependency walker.

        N Offline
        N Offline
        Nibu babu thomas
        wrote on last edited by
        #9

        tejaswini.g wrote:

        Sorry ,I don't know how to use dependency walker. Can u say how to use dependency walker.

        Goto Start->Run Type "depends" without quotes. This will open dependency walker. Now open your exe and see the listing of dlls on which your exe is dependent. Or Right click on your exe and select "View dependencies". You will see this if you have dependency walker installed.


        Nibu thomas A Developer Programming tips[^]  My site[^]

        1 Reply Last reply
        0
        • V vc _fragrance

          Thank you. Sorry ,I don't know how to use dependency walker. Can u say how to use dependency walker.

          V Offline
          V Offline
          vc _fragrance
          wrote on last edited by
          #10

          Thanks alot. I got it. Thanks all of you once again.

          1 Reply Last reply
          0
          • V vc _fragrance

            Hi, I have created an application using mfc and I got the exe in debug folder. I took the exe file and placed in another system in which there is no visual studio software.when I tried to run the exe file I got the error saying that there is no MFC42D.DLL , c:\WINNT\system32;.......... How can I rectify this problem and run the exe file. Can u Plz help me. Thanks in advance.

            A Offline
            A Offline
            A_Fa
            wrote on last edited by
            #11

            -Go to your project -Press ALT+ f7 -In General tab from Microsoft foundation classes Select "Use MFC in Static Library" then compile your prj again

            T 1 Reply Last reply
            0
            • A A_Fa

              -Go to your project -Press ALT+ f7 -In General tab from Microsoft foundation classes Select "Use MFC in Static Library" then compile your prj again

              T Offline
              T Offline
              toxcct
              wrote on last edited by
              #12

              the best way to have huge exes...


              TOXCCT >>> GEII power

              [VisualCalc 3.0  updated ][Flags Beginner's Guide  new! ]

              E 1 Reply Last reply
              0
              • C Cedric Moonen

                First, you have to tell us which IDE you used to compile (VC6, VC2005, ...). Things are different dependending on the IDE you used. To find which dll needs to be distributed with your app, open the dependency walker (the program is normally supplied with the IDE but you can find it easily on the web also). It will show you all the dll that your app requires. Also, do not distribute debug version of your program (and dll). This is not legal (particularly for distributing the debug version of the microsoft dll's).


                Cédric Moonen Software developer
                Charting control [Updated - v1.1]

                H Offline
                H Offline
                Hamid Taebi
                wrote on last edited by
                #13

                In additional I remember that we have an example in MSDN that it shows all files that your program use of their.:)

                _**


                **_

                WhiteSky


                1 Reply Last reply
                0
                • V vc _fragrance

                  Thank you. Sorry ,I don't know how to use dependency walker. Can u say how to use dependency walker.

                  H Offline
                  H Offline
                  Hamid Taebi
                  wrote on last edited by
                  #14

                  See here[^]

                  _**


                  **_

                  WhiteSky


                  1 Reply Last reply
                  0
                  • V vc _fragrance

                    Thank you. Can u plz say is there any method to create an installation file with all the required files to run an application successfully.

                    P Offline
                    P Offline
                    prasad_som
                    wrote on last edited by
                    #15

                    you need to create set up. One of method is using InstallShield. If you are using VC 7.0 +.Then you can use wizardv to create set up.

                    Prasad Notifier using ATL

                    V 1 Reply Last reply
                    0
                    • T toxcct

                      the best way to have huge exes...


                      TOXCCT >>> GEII power

                      [VisualCalc 3.0  updated ][Flags Beginner's Guide  new! ]

                      E Offline
                      E Offline
                      Emilio Garavaglia
                      wrote on last edited by
                      #16

                      Not necessarily true: MFC DLL contains all the MFC code, while linking the static LIB will cause only the required OBJ module to be included in the EXE. In general the sum of the "small" exe and the DLL exceed the one of the "long" exe. Then, it depends on how many MFC classes are directly or indirectly used and how many MFC depending exe-s are supposed to be on the target system.

                      2 bugs found. > recompile ... 65534 bugs found. :doh:

                      1 Reply Last reply
                      0
                      • V vc _fragrance

                        Hi, I have created an application using mfc and I got the exe in debug folder. I took the exe file and placed in another system in which there is no visual studio software.when I tried to run the exe file I got the error saying that there is no MFC42D.DLL , c:\WINNT\system32;.......... How can I rectify this problem and run the exe file. Can u Plz help me. Thanks in advance.

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

                        tejaswini.g wrote:

                        How can I rectify this problem and run the exe file.

                        Compile in release mode. You cannot redistribute the debug version of the DLLs.


                        "Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.

                        "Judge not by the eye but by the heart." - Native American Proverb

                        1 Reply Last reply
                        0
                        • P prasad_som

                          you need to create set up. One of method is using InstallShield. If you are using VC 7.0 +.Then you can use wizardv to create set up.

                          Prasad Notifier using ATL

                          V Offline
                          V Offline
                          vc _fragrance
                          wrote on last edited by
                          #18

                          Thnak you prasad. I am using vc++ 6.0 . Can u plz say how to create setup . Thanks in advance.

                          P 1 Reply Last reply
                          0
                          • V vc _fragrance

                            Thnak you prasad. I am using vc++ 6.0 . Can u plz say how to create setup . Thanks in advance.

                            P Offline
                            P Offline
                            prasad_som
                            wrote on last edited by
                            #19

                            Does this[^] helps you?

                            Prasad Notifier using ATL

                            V 1 Reply Last reply
                            0
                            • P prasad_som

                              Does this[^] helps you?

                              Prasad Notifier using ATL

                              V Offline
                              V Offline
                              vc _fragrance
                              wrote on last edited by
                              #20

                              Thank you prasad, it's very much useful for me.

                              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