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 a EXE in windows

How to make a EXE in windows

Scheduled Pinned Locked Moved C / C++ / MFC
c++linuxhelptutorialworkspace
18 Posts 6 Posters 1 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 OmarSH

    HOW???? i mean i downloaded a full source code of program , if you know how to do it ,tell me or give me such a link or e-book that could explain the procedure it detail, thank anyway

    _ Offline
    _ Offline
    _Superman_
    wrote on last edited by
    #6

    Download Visual Studio express as replied earlier. In that you need to create a project. There are several types of projects in Visual Studio. Here is a simple tutorial - http://www.swarthmore.edu/NatSci/tali/E15/Visual_C.html[^] You need to create a project, add the source files to it, compile it and fix the compiler type errors if any. After this process, you will have an executable. As for creating a setup program, you can use the free Wix Toolset. It will integrate with Visual Studio so that you can create the setup program from Visual Studio itself. You can download it from here - http://wixtoolset.org/[^] Here is an extensive tutorial on Wix - http://wix.tramontana.co.hu/tutorial[^]

    «_Superman_»  _I love work. It gives me something to do between weekends.

    _Microsoft MVP (Visual C++) (October 2009 - September 2013)

    Polymorphism in C

    1 Reply Last reply
    0
    • B Brandon X12000

      Here's how to make a simple .exe (application executable program) in Windows, copy this source to a file that will call main.cpp

      // We will declare our header files as our first column
      #include // Declare namespaces as the second column
      using namespace std;

      // "int main()" serves as the starting point for our program
      int main()
      {
      cout << "Hello user!" << endl;

       return 0;
      

      }

      Compile this and go to your project's folder and double-click on a folder called bin and then double click on the folder called debug. If its not in there click on the other folder which is called release, if you managed to accidently compiled a release version of your program. And there it is, your first made .exe file.:cool:

      Simple Greetings and Regards, Brandon Programming in C and C++ now, now developing applications, services and drivers (and maybe some kernel modules...psst kernel-mode drivers...psst). Many of life's failures are people who did not realize how close they were to success when they gave up. - Thomas Edison

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #7

      Brandon-X12000 wrote:

      // We will declare our header files as our first column

      That's the first line, or row.

      Brandon-X12000 wrote:

      double-click on a folder called bin

      Visual C++ Express does not create bin directories.

      Use the best guess

      1 Reply Last reply
      0
      • O OmarSH

        HOW???? i mean i downloaded a full source code of program , if you know how to do it ,tell me or give me such a link or e-book that could explain the procedure it detail, thank anyway

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #8

        You need to understand the process of compiling and linking. If these are new concepts to you then take a look at How to: Compile a Native C++ Program from the Command Line[^].

        Use the best guess

        1 Reply Last reply
        0
        • B Brandon X12000

          Here's how to make a simple .exe (application executable program) in Windows, copy this source to a file that will call main.cpp

          // We will declare our header files as our first column
          #include // Declare namespaces as the second column
          using namespace std;

          // "int main()" serves as the starting point for our program
          int main()
          {
          cout << "Hello user!" << endl;

           return 0;
          

          }

          Compile this and go to your project's folder and double-click on a folder called bin and then double click on the folder called debug. If its not in there click on the other folder which is called release, if you managed to accidently compiled a release version of your program. And there it is, your first made .exe file.:cool:

          Simple Greetings and Regards, Brandon Programming in C and C++ now, now developing applications, services and drivers (and maybe some kernel modules...psst kernel-mode drivers...psst). Many of life's failures are people who did not realize how close they were to success when they gave up. - Thomas Edison

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

          well i know how to program , i am talking about compiling about 500 C++ and .h files in one time and make the program thats what i am talking about, well thank you any way

          D 1 Reply Last reply
          0
          • O OmarSH

            well i know how to program , i am talking about compiling about 500 C++ and .h files in one time and make the program thats what i am talking about, well thank you any way

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

            OmarSH wrote:

            ...i am talking about compiling about 500 C++ and .h files...

            Are they all part of the same project?

            "One man's wage rise is another man's price increase." - Harold Wilson

            "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

            "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

            O 1 Reply Last reply
            0
            • D David Crow

              OmarSH wrote:

              ...i am talking about compiling about 500 C++ and .h files...

              Are they all part of the same project?

              "One man's wage rise is another man's price increase." - Harold Wilson

              "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

              "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

              O Offline
              O Offline
              OmarSH
              wrote on last edited by
              #11

              yes , i said i downloaded the source code of a program and i dont have idea, any thing could help

              D 1 Reply Last reply
              0
              • O OmarSH

                yes , i said i downloaded the source code of a program and i dont have idea, any thing could help

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

                In that download, were there any project-specific files (e.g., DSW, DSP, SLN)?

                "One man's wage rise is another man's price increase." - Harold Wilson

                "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

                O 1 Reply Last reply
                0
                • D David Crow

                  In that download, were there any project-specific files (e.g., DSW, DSP, SLN)?

                  "One man's wage rise is another man's price increase." - Harold Wilson

                  "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                  "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

                  O Offline
                  O Offline
                  OmarSH
                  wrote on last edited by
                  #13

                  no, nor of visual studio files are included ,it has configure files and other files that could make it done easily on linux ,i can build and install it on linux , but i need to build it just for windows ,

                  D 1 Reply Last reply
                  0
                  • O OmarSH

                    no, nor of visual studio files are included ,it has configure files and other files that could make it done easily on linux ,i can build and install it on linux , but i need to build it just for windows ,

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

                    OmarSH wrote:

                    ...but i need to build it just for windows ,

                    Console, EXE, or DLL?

                    "One man's wage rise is another man's price increase." - Harold Wilson

                    "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                    "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

                    O 1 Reply Last reply
                    0
                    • D David Crow

                      OmarSH wrote:

                      ...but i need to build it just for windows ,

                      Console, EXE, or DLL?

                      "One man's wage rise is another man's price increase." - Harold Wilson

                      "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                      "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

                      O Offline
                      O Offline
                      OmarSH
                      wrote on last edited by
                      #15

                      no, any way the program called( Lammps) ,it is program education, you can download the source code from sourceforge http://sourceforge.net/projects/lammps/[^]

                      D 1 Reply Last reply
                      0
                      • O OmarSH

                        no, any way the program called( Lammps) ,it is program education, you can download the source code from sourceforge http://sourceforge.net/projects/lammps/[^]

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

                        OmarSH wrote:

                        no...

                        So is it a service then? If it's not any of those four, what type of Windows program are you trying to create?

                        "One man's wage rise is another man's price increase." - Harold Wilson

                        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                        "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

                        O 1 Reply Last reply
                        0
                        • D David Crow

                          OmarSH wrote:

                          no...

                          So is it a service then? If it's not any of those four, what type of Windows program are you trying to create?

                          "One man's wage rise is another man's price increase." - Harold Wilson

                          "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                          "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

                          O Offline
                          O Offline
                          OmarSH
                          wrote on last edited by
                          #17

                          well, thank you for interesting , any way if you have see the link ,and downloaded the source code , you may have better vision because i started programming in c++ from no more than one years ,and this is the first time that i want to do something like that,most of my program were no more than one or two C++ files and a header, this my programming background ,so i don't know how to explain more than that.. i really need help and advice to explain more..

                          D 1 Reply Last reply
                          0
                          • O OmarSH

                            well, thank you for interesting , any way if you have see the link ,and downloaded the source code , you may have better vision because i started programming in c++ from no more than one years ,and this is the first time that i want to do something like that,most of my program were no more than one or two C++ files and a header, this my programming background ,so i don't know how to explain more than that.. i really need help and advice to explain more..

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

                            Start by creating an empty Windows program (whether you opt for console or Win32 is up to you), then add to it those files you downloaded.

                            "One man's wage rise is another man's price increase." - Harold Wilson

                            "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                            "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

                            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