[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?
| |
| |
| | | | | | | | | 1. fglswh (57) | 3 months 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.
| |
| |
|
| | washington d.c. souvenir gifts America's Home for Patriotic Gifts & Souvenirs From Washington DC www.CapitolShoppingMall.com | add comment |
|
| | 2. kaka135 (2759) | 2 months 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.
| |
| |
|
| | Computer Programming Scholarship Tap Into $7 Billion In Scholarship Funds. Get Guide Now 100% Free. FreeEducationGuide.com | add comment |
|
| | | 3. valorz (4) | 1 month ago | maybe you have to install the .net framework 2.0 on the computer which you want to run your program on
| |
| |
|
| | Sndvol32 Exe File Update your Sndvol32 Exe File with official drivers. Free download. Sndvol32ExeFile.Driver-Fix.com | add comment |
|
| | | 4. shanmukhsista (75) | 1 month 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.
| |
| |
|
| | Moving Company, WA Free Truck Rental with move in. Reserve now. No CC required. www.MiniuStorage.com | add comment |
|
| | | | Moving Company, WA Free Truck Rental with move in. Reserve now. No CC required. www.MiniuStorage.com
| Remove Dl Exe Remove All Spyware In 60 Seconds. Free Download. 100% Guaranteed. WindowsAntiSpyware.org
| WA Appraisal Course Become A Real Estate Appraiser Now Quick& Easy Home Study Courses. www.RealEstateLicense.com
|
| | | |
| Moving Company, WA Free Truck Rental with move in. Reserve now. No CC required. www.MiniuStorage.com | |
Remove Dl Exe Remove All Spyware In 60 Seconds. Free Download. 100% Guaranteed. WindowsAntiSpyware.org | |
WA Appraisal Course Become A Real Estate Appraiser Now Quick & Easy Home Study Courses. www.RealEstateLicense.com | |
Washington Rock Climbs Cragging or alpine rock climbing, beginner or advanced, we guide it. www.mountainmadness.com | |
|