Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Creating an Application

Posted on 2004-09-10
Medium Priority
Last Modified: 2010-04-17
Okay, I have asked this question to many of people, but none have been able to answer it and some not able to figure out what I'm talking about, so I'm going to try and explain it the best I can.

I am interested in making an application, that is, something that can run on every computer.  Like right now I can program with many things, and I have made programs before, like on TextPad or C++, but my friends can't run the programs because they would need TextPad or C++ to run them.  I was wondering how to make a program that doesn't need something else to run it, you can just double click it and go.  Like when you download something off of the internet, it might be an install program, so you double click the install program it brings up a window, and you agree to the terms and agreements and stuff, and then all the files are extracted.  Afterwards, you go to the folder and double click another file, which is an application (right?), and the program runs.  You didn't need to put anything like VB or C++ on your computer, you just downloaded and went, how do I make something like that, what do I use, can you point me in the right direction?

I can really put it any other way, people have tried to help me and I've only ended up with things to make install programs, I want to know how to make the thing AFTER the install program.

Thanks for any help you can give.


P.S., I'm not lazy, I've tried doing searches and stuff, but guess what you get when you try to figure out how to make an application using google? Yeah, Job Applications, so I do -job, at the end, that doesn't help, you still get lots of random crap, lol, I'm so lost.

Thanks again.
Question by:simpsons17371
  • 2
  • 2
  • 2
  • +3

Expert Comment

ID: 12033101
not sure if I understand exactly, but you might do some checking into writing your program in Assembler.
LVL 86

Accepted Solution

Mike Tomlinson earned 1000 total points
ID: 12033116
It sounds to me like what you have been doing is sharing your source code with your friends.  To run source code, you have to open up that languages design environment and run it from there, which is why your friends must have that language installed on their system.

What you need to do is compile your source code into an executable.  An executable is your source code converted into machine language that can be run without the languages design environment.  Compiling an application is done differently for every language/design environment.  Usually there is an option somewhere in the menus such as:

1) File --> Make something.EXE
2) Solution --> Build Solution
3) Run --> Create Executable

or something along those lines.  You can then give the resulting EXE file to your friends, who should be able to run it without the complete language installed on their system.

Now depending on the language and/or type or application you have written, you may have what are called "external dependicies" for your program.  These are components or DLL's that your application must have on the end system to run correctly.  In these cases, you need an Installation Packager that can determine all the external files your program needs and then package them up all together in an Install Package.  Most Installer applications will do the behind the scenes things such as registering components and DLL's for you as well as create shortcuts and start menu entries.

Hope this has shed some light on the process.



Expert Comment

ID: 12033550
Idle Mind explained it very well for you. What you have been doing is giving your source code to your friends (or customers) and asking them to re-compile and test run your application.

In the real world, the source code is considered your own property and you should not give it to anyone else unless this is what you mean to do.

For example: Microsoft produces MS Office (Word, Excel, PowerPoint etc...) but Microsoft does not give you the source code for the Office so that you can type a letter in Microsoft Word for example. What Microsoft gives you is the EXECUTABLE file. the EXE file basically contains the compiled version of your source code. The cycle goes like this:
Write Source Code --> Compile (to produce object files) --> Build (produces exe file)

Actually if you have Microsoft Word on your computer, search for the file Winword.exe. This is the file where the whole Microsoft Word resides. How did Microsoft build this exe file? They used a programming language (VB or C++ or assembly) to write the code then they compiled the code into an EXE file which is the Winword.exe.

You mentioned C++ in your question. I assume you are using some kind of a C++  compiler (there are many in the market). What you need to do when you are done writing the code is to go to Build Project or Build Executable and that will create the EXE file on your hard disk. THIS IS THE FILE YOU WANT TO DISTRIBUTE.

Hope this helped.

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 61

Expert Comment

by:Julian Hansen
ID: 12033564
You need a compiler and you need to choose your language.

Visual Studio .Net will give you Visual Basic Visual C/C++ VB. Net C# etc. All of these languages can be compiled into an executable format that will run on Windows platforms.

If you want to build for another platform (Unix, Linux, Mac etc) you will need to get a compiler specifically for those platforms.

gcc (Gnu C Compiler) is a freeware compiler that will run on most platforms. It does not provide an IDE (Integrated Development Environment) like you would get in Visual Studio.

Delphi is another option if you are familiar with Pascal.

There are many others but those are the mainstream ones.


Expert Comment

ID: 12034084
If you are using Microsoft Visual C++ 6.0 for example, after you compiler, biuld your program, the executable (.exe file) gets automatically created, it would be found in a "Debug" folder, this folder would be in the same dirctory as your .cpp program. When you run your program from the Visual Studio enviroment, what you actually run is this .exe file. This is the file that you should give to your friends.....they would just click it and it would run on their PC (as you had said).

I hope that would help

Expert Comment

ID: 12034091
>> after you compiler, biuld your program

that should have been     "after you compile, and build your program........"

Author Comment

ID: 12034784
Wow guys, thanks, but one last question, going back on what Idle_Mind said, about the .DLL files, is there a way to know if its going to need certain .DLL files, or would I just have to give it to a friend, let him run it, see the error, and then give him the .DLL file, and keep testing it until there are no more errors, then I can make an install program with all the necessary files in it?

Thanks again for the help.

LVL 86

Expert Comment

by:Mike Tomlinson
ID: 12034800
*Most of the languages that include an Install package creator are supposed to figure out what external references are required for your app to run and include them with your app.

If they don't work properly then you have two options:

1) Use a third party (one that didn't come with your language) install package creator (sadly, this is necessary often)
2) Use the trial and error method you just described

Some of the languages actually have a tool that will list all of the external references so you can easily package them or gather them up somehow.

If you are using C++ then list your version number and I'm sure the experts here EE will be able to give you specific advice on what or what does not work well.


Author Comment

ID: 12035019
Ok, thanks, if I ever get an error I can't fix with .DLL's or something, I'll just post a new question thread here.

Thanks for the help.


Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
Six Sigma Control Plans
Screencast - Getting to Know the Pipeline

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question