Creating an Application

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.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

not sure if I understand exactly, but you might do some checking into writing your program in Assembler.
Mike TomlinsonHigh School Computer Science, Computer Applications, and Mathematics TeachersCommented:
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.



Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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.

Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Julian HansenCommented:
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.

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
>> after you compiler, biuld your program

that should have been     "after you compile, and build your program........"
simpsons17371Author Commented:
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.

Mike TomlinsonHigh School Computer Science, Computer Applications, and Mathematics TeachersCommented:
*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.

simpsons17371Author Commented:
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.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.