7 Replies - 1983 Views - Last Post: 02 July 2010 - 07:22 PM Rate Topic: -----

#1 yohosuff  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 0
  • View blog
  • Posts: 47
  • Joined: 01-May 09

My exe won't execute on windows xp

Posted 02 July 2010 - 06:02 AM

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!

Is This A Good Question/Topic? 0
  • +

Replies To: My exe won't execute on windows xp

#2 NickDMax  Icon User is offline

  • Can grep dead trees!
  • member icon

Reputation: 2250
  • View blog
  • Posts: 9,245
  • Joined: 18-February 07

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.
Was This Post Helpful? 1
  • +
  • -

#3 olibenu  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 45
  • View blog
  • Posts: 537
  • Joined: 31-December 08

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!
Was This Post Helpful? 0
  • +
  • -

#4 yohosuff  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 0
  • View blog
  • Posts: 47
  • Joined: 01-May 09

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.
Was This Post Helpful? 0
  • +
  • -

#5 NickDMax  Icon User is offline

  • Can grep dead trees!
  • member icon

Reputation: 2250
  • View blog
  • Posts: 9,245
  • Joined: 18-February 07

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???
Was This Post Helpful? 0
  • +
  • -

#6 Filox  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 4
  • Joined: 24-June 10

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.
Was This Post Helpful? 0
  • +
  • -

#7 taylorc8  Icon User is offline

  • B&

Reputation: 149
  • View blog
  • Posts: 1,572
  • Joined: 21-July 09

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

This post has been edited by taylorc8: 02 July 2010 - 01:40 PM

Was This Post Helpful? 2
  • +
  • -

#8 yohosuff  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 0
  • View blog
  • Posts: 47
  • Joined: 01-May 09

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!

This post has been edited by yohosuff: 02 July 2010 - 07:25 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1