Friday, July 31, 2009

Once you finish a program what do you do ?

hey guys my question is what do i do when i finish with my program hahahahah the teacher only tells us to send us the sorce code.


but i never know how do i send the program to other people so they can see my work.





and if i send them the progam will it conflict on there computer ? becouse they dont have the .NET update ?





how do i make a program in C++ and on visual basic so anyone can see it at the end i mean,


how do i convert it to an .EXE file ?





my main question is... what do i do next when i finish the program ?





Additional Details





1 day ago


oh yea my compiler is visual studio


i got it thanks to my university


they got some sort of contract with windows





and yea i see a .EXE in the foulder but culd a none .NET or a none compiler prepared computer execute the program ?





i got


visual studio 2005

Once you finish a program what do you do ?
If the teacher asks for source code, just send source code. You don't worry about the executable and so on. Obviously, make sure the code compiles properly, because if the teacher can't compile it, you fail.





Ok, there's two ways you can distribute a program. You can either distribute the source, forcing people to compile it themselves. Or you can distribute the binary, the result after compiling the source.





There's three types of programming languages (this is one way to classify them). Native compilation, JIT compile/bytecode interpreter, and a source interpreter.





So, with a native compilation, you get an executable that depends on the computer itself (or more precisely the processor), the OS, (Windows binaries are different from Linux binaries), and any runtime libraries that your program needs (example is CRT runtime when dynamically linked). When distributing binaries, you need to make sure all three are satisfied. That's why when downloading files, you see information like, Windows, i386. Or Linux, K-8, requires so and so packages on the system, etc. Standard C and Standard C++ give you a native executable.





With JIT compilation or a bytecode interpreter, your executable isn't native. The processor does not understand the instructions in it, because it really is an intermediate file. Instead, you need whatever interpreter or runtime environment is necessary to work with that intermediate file. The intermediate file may or may not be OS specific, depending on how the language works. For .NET languages like C++ .NET, C# .NET, VB .NET, etc., your programs require the .NET runtime to be run. Without it, they won't work. Yes, you will need to tell people that it requires .NET. If they don't have it, they can't use it. Same with Java. People need the Java runtime environment to run java programs.





Source interpeted is like bytecode interpreted or JIT compiled in that you need an interpreter. Ruby and Python are good examples (Python can be distributed in bytecode form though).





Hope my explanation clarifies.
Reply:You have to compile it to a .EXE. You go to the Top Bar that has File Edit View...... When you have a program that is open then there is a Build. Click on that and go to Build.
Reply:I'm not exactly sure what you are asking, but there should be a .exe inside your project folder, possibly in the debug or release subdirectories. That is your program.
Reply:Put all the files you used for the program into a zip folder. there should be an .exe file in your debug folder. If not you need to debug your app. Unfortuanitly any computer that wants to use it needs to have the .net framework or Visual Studio installed.





Microsoft Visual Studio 2005 Help Group


http://tech.groups.yahoo.com/group/Micro...


No comments:

Post a Comment