Hey all,
I just built my project and produced an exe file that runs fine on my (English) Windows 7 PC, but when I copy it over to my (Chinese) Windows XP netbook, I get an error message. It says that the program can't execute. I would post the exact error message, but it's in Chinese characters. However, I noticed that it doesn't mention missing dll files in the error message. It just says it can't be opened.
My question is this: How can I get this program to run on the Windows XP netbook? Is there something I'm over-looking?
If there are any Chinese speakers/readers/listeners/writers out there, let me know if I should post the exact message.
Thanks for any help!
My exe won't execute on windows xp
Page 1 of 17 Replies - 1492 Views - Last Post: 02 July 2010 - 07:22 PM
Replies To: My exe won't execute on windows xp
#2
Re: My exe won't execute on windows xp
Posted 02 July 2010 - 06:16 AM
Well what compiler did you use, what dependencies do you have?
Some compilers have a set of "common run-time libraries" that they like to use. For example putting all of the nice C functions (printf/scanf/pow/sqrt etc) into a dll file so that they don't have to take up space in every program that uses them. So generally when you compiler with say MSVS2008 there are a set of dll files that you need to include.
I *think* that you CAN get the compiler/linker to put everything into the exe and not require the run time library but I am not 100% sure of that. Generally though you can install the runntime on the target machine as part of your installer.
Though if you used features specific to windows 7 then of course you can't run it on windows XP without also providing some kind of "compatibility" -- generally it is best to just kind of avoid using the latest and greatest features if you want your program to be downwardly compatible.
Some compilers have a set of "common run-time libraries" that they like to use. For example putting all of the nice C functions (printf/scanf/pow/sqrt etc) into a dll file so that they don't have to take up space in every program that uses them. So generally when you compiler with say MSVS2008 there are a set of dll files that you need to include.
I *think* that you CAN get the compiler/linker to put everything into the exe and not require the run time library but I am not 100% sure of that. Generally though you can install the runntime on the target machine as part of your installer.
Though if you used features specific to windows 7 then of course you can't run it on windows XP without also providing some kind of "compatibility" -- generally it is best to just kind of avoid using the latest and greatest features if you want your program to be downwardly compatible.
#3
Re: My exe won't execute on windows xp
Posted 02 July 2010 - 06:35 AM
how did you copy it over to your (Chinese) Windows XP netbook, usb drive? over a network?
the app may be corrupted!
the app may be corrupted!
#4
Re: My exe won't execute on windows xp
Posted 02 July 2010 - 09:29 AM
@NickDMax
Thanks for the great reply. I'll look into what dependencies my program is... depending on. I like the idea of including all of them in the executable. I'm using MS VC++ 2008 Express.
@olibenu
I e-mailed it to myself then downloaded it on the netbook.
Thanks for the great reply. I'll look into what dependencies my program is... depending on. I like the idea of including all of them in the executable. I'm using MS VC++ 2008 Express.
@olibenu
I e-mailed it to myself then downloaded it on the netbook.
#5
Re: My exe won't execute on windows xp
Posted 02 July 2010 - 10:52 AM
ok so I could try installing the 2008 Redistributable Package for your platform. ???Note you may need the Chinese version???
#6
Re: My exe won't execute on windows xp
Posted 02 July 2010 - 12:06 PM
if you haven't resolved this issue yet and as you said you are using microsoft visual studio 2008 you can :
->Right Click on your project,
->Properties page,
->Configuration Properties,
->C/C++,
->Code Generation,
->Runtime Library and pick "Multi-threaded Debug (/MTd)"
Your .exe will be somewhat bigger but it will run on PCs that don't have Visual Studio 2008.
I hope this helps.
->Right Click on your project,
->Properties page,
->Configuration Properties,
->C/C++,
->Code Generation,
->Runtime Library and pick "Multi-threaded Debug (/MTd)"
Your .exe will be somewhat bigger but it will run on PCs that don't have Visual Studio 2008.
I hope this helps.
#7
Re: My exe won't execute on windows xp
Posted 02 July 2010 - 01:40 PM
Using the "Release mode" is what you will likely need to make your app work on other PC's with VS2008. I don't know much about the Visual C redist, but you probably need it, you can find it with a google search, M$ provides a download link.
I get a good feeling you need to build the .exe in "Release" mode and have the Visual C redistributable
I get a good feeling you need to build the .exe in "Release" mode and have the Visual C redistributable
This post has been edited by taylorc8: 02 July 2010 - 01:40 PM
#8
Re: My exe won't execute on windows xp
Posted 02 July 2010 - 07:22 PM
@taylorc8
Release mode worked!
I did the following:
1. Project -> Properties
2. Configuration Properties
3. Configuration Manager at the top-right.
4. Changed Active solution configuration from Debug to Release.
5. Close -> OK -> Build
Thanks for all the help everyone!
Release mode worked!
I did the following:
1. Project -> Properties
2. Configuration Properties
3. Configuration Manager at the top-right.
4. Changed Active solution configuration from Debug to Release.
5. Close -> OK -> Build
Thanks for all the help everyone!
This post has been edited by yohosuff: 02 July 2010 - 07:25 PM
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote





|