[Beginner's question] Why the exe file cannot be opened in all computers?  | | | | I've just started learning C++ programing in my university. To have a easy reference to my textbook, I use Microsoft Visual Studio 2005. Of course, to start learning a programming language, the first program is usually the HelloWorld program. I'm no exception. I've learnt Pascal and thus, this is easy to me and a exe file is generated successuflly in the first time. It ran successfully in my computer. However, when I move the file to another computer, the file cannot be run successfully, with the error message telling me that some setting of my program is wrong, asking me to reinstall the program. (which is of course impossible...) The file path: C:\...\HelloWorldProject\debug\HelloWorldProject.exe The only way out is to use the source code to compile the program again in that computer. However, the exe file compiled there also cannot be run in other computer. In other words, due to unknown reason(s), the exe file is machine dependent! As far as I know, C++ is not a machine dependent programming language. So, what's wrong with my file? How can I compile a file that is machine independent? | | | | | | | | | | Web Developer MS Degree Become a Skilled Web Developer w/a Master's Degree in Internet Systems EducationDegreeSource.com/Online_MS
| Online Degrees Top Online Degrees. Get the Education You Need To Succeed. www.onlineuniversities.net
| Top 2011 Online Grants Grant funding may be available - Go Back to School! www.ClassesUSA.com
|
| | | | | | | | | | |
| | 1. fglswh (58)
|
3 years ago
| | I have not used VC++, but i have used Delphi to develop software. If your program is very simple, the error should not happen, unless you have coded a complex program. In order to resolve this problem, you'd better paste the error message. | | | | | | | | | | Web Developer MS Degree Become a Skilled Web Developer w/a Master's Degree in Internet Systems EducationDegreeSource.com/Online_MS | add comment | | | |
| 2. kaka135 (3362)
|
3 years ago
| | Well, I'm using Microsoft Visual Studio 2005 to build web applications, and some Windows applications too. I always created a setup file for me to install the Windows application in another computer, instead of just copy the executable file over, as the application needs to run with some other dependencies. Have you checked the correct path for the HelloWorldProject.exe? As you mentioned the file path is C:\...\HelloWorldProject\debug\HelloWorldProject.exe, it seems to be the path in your computer where you developed the project, but the path may not exist in the other computer. The executable file may need to run with some dependency files, I suppose .NET Framework is one of the dependencies. Though Microsoft said that the applications are machine-independent, it has to install .NET Framework at least, if I am not mistaken. Try to create a setup file and install it in the other computer, it'll help you to install the necessary dependency files too. | | | | | | | | | | Online Degrees Top Online Degrees. Get the Education You Need To Succeed. www.onlineuniversities.net | add comment | | | |
| | 3. valorz (10)
|
3 years ago
| | maybe you have to install the .net framework 2.0 on the computer which you want to run your program on | | | | | | | | | | Top 2011 Online Grants Grant funding may be available - Go Back to School! www.ClassesUSA.com | add comment | | | |
| | 4. shanmukhsista (72)
|
3 years ago
| | If you are using visual studio environment to develop a windows application then to run the program you must have dot net framework required that you selected when creating a new project. Try running with .net installed or on windows vista or later. Windows vista contains .net framework inbuilt so no need for installing. | | | | | | | | | | Study Psychology Online Find & Compare Psychology Degree Programs Online Now. universaldegrees.com | add comment | | | |
| 5. myzire72 (1085)
|
3 years ago
| | I think you are lacking the .Net framework which is mandatory for your program to run. It's just like Java, if without the dependent classes, simply won't run. In fact, keep this in mind in future if you distribute or sell your software applications. Let your users know they have to install the .Net framework before they can run your software. If possible, include the link to download or let your software determine whether .Net framework is installed, and if not, download and install automatically from Microsoft. | | | | | | | | | | Fix Computer Problems Check your PC for errors that can impact its performance. FREE SCAN. www.ReviverSoft.com | add comment | | | |
| | | | | | | | | | Carreers help!!!
I want to work with computers, fixing them and programming.
Any ideas of carreers of something...
| | kicked out!
Well I failed one of my classes which caused my funding to stop, now I'm kicked out until I pay the...
| | | Study Psychology Online Find & Compare Psychology Degree Programs Online Now. universaldegrees.com | | | Fix Computer Problems Check your PC for errors that can impact its performance. FREE SCAN. www.ReviverSoft.com | | | Computer Programming Looking For Computer Programming? Find It Nearby With Local.com! Local.com | | | Online Christian College Online Accredited Christian College. Ready to answer God’s call? www.nbc.edu | | | Halliday Solutions Manual View Even & Odd Halliday Textbook Problems Explained Step-By-Step! Cramster.com/Physics_Halliday | | |