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. Please help for generating exe file!

Please help for generating exe file!

Scheduled Pinned Locked Moved C / C++ / MFC
questiondebugginghelplearning
8 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.
  • T Offline
    T Offline
    tiancaidao
    wrote on last edited by
    #1

    Hi, I don't want to see so many files, and it is not convenient to take so many files to my friends. So how can I generate a single .exe file from several files (with extension .exe and .dll) under "Debug" directory? Of course, it must work. :) it is a win32 console application.

    S R 2 Replies Last reply
    0
    • T tiancaidao

      Hi, I don't want to see so many files, and it is not convenient to take so many files to my friends. So how can I generate a single .exe file from several files (with extension .exe and .dll) under "Debug" directory? Of course, it must work. :) it is a win32 console application.

      S Offline
      S Offline
      StarMeteor
      wrote on last edited by
      #2

      have you try to generate a release version?

      T 1 Reply Last reply
      0
      • T tiancaidao

        Hi, I don't want to see so many files, and it is not convenient to take so many files to my friends. So how can I generate a single .exe file from several files (with extension .exe and .dll) under "Debug" directory? Of course, it must work. :) it is a win32 console application.

        R Offline
        R Offline
        Ryan Binns
        wrote on last edited by
        #3

        Which DLLs are you linking against? If it's the C library and the MFC library, you can change your linker <edit>settings</edit> to link to them statically, rather than dynamically.

        Ryan

        "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"

        T 1 Reply Last reply
        0
        • R Ryan Binns

          Which DLLs are you linking against? If it's the C library and the MFC library, you can change your linker <edit>settings</edit> to link to them statically, rather than dynamically.

          Ryan

          "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"

          T Offline
          T Offline
          tiancaidao
          wrote on last edited by
          #4

          the dll I want to link is built by another project of the same solution.

          R 1 Reply Last reply
          0
          • T tiancaidao

            the dll I want to link is built by another project of the same solution.

            R Offline
            R Offline
            Ryan Binns
            wrote on last edited by
            #5

            The only reasonable way you can include it in your executable is to build it as a static library rather than a DLL, and link to it statically instead of dynamically.

            Ryan

            "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"

            T 1 Reply Last reply
            0
            • S StarMeteor

              have you try to generate a release version?

              T Offline
              T Offline
              tiancaidao
              wrote on last edited by
              #6

              I tried just now, result is the same. the project generate a the .exe file, but I need a dll which generate by another project to run with it, and I must set the two project output to the same outputDir.

              1 Reply Last reply
              0
              • R Ryan Binns

                The only reasonable way you can include it in your executable is to build it as a static library rather than a DLL, and link to it statically instead of dynamically.

                Ryan

                "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"

                T Offline
                T Offline
                tiancaidao
                wrote on last edited by
                #7

                Do you mean I should use dllimport statements in my source?

                R 1 Reply Last reply
                0
                • T tiancaidao

                  Do you mean I should use dllimport statements in my source?

                  R Offline
                  R Offline
                  Ryan Binns
                  wrote on last edited by
                  #8

                  Huh? No. Recompile your DLL as a static library - change its project settings to compile as a static library rather than a DLL.

                  Ryan

                  "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"

                  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