Solved

Creating an Application

Posted on 2004-09-10
9
296 Views
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.

Mark

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.
0
Comment
Question by:simpsons17371
  • 2
  • 2
  • 2
  • +3
9 Comments
 
LVL 5

Expert Comment

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

Accepted Solution

by:
Mike Tomlinson earned 250 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.

Regards,

Idle_Mind
0
 
LVL 1

Expert Comment

by:Bestdev
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.
Ayman

0
 
LVL 51

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.

0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 3

Expert Comment

by:mte01
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
0
 
LVL 3

Expert Comment

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

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

Author Comment

by:simpsons17371
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.

Mark
0
 
LVL 85

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.

Idle_Mind
0
 
LVL 1

Author Comment

by:simpsons17371
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.

Mark
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now