12 Replies - 13648 Views - Last Post: 08 April 2008 - 11:59 AM Rate Topic: -----

#1 geewhiz  Icon User is online

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 54
  • Joined: 20-August 07

Visual C++ program won't run on another PC?

Posted 04 April 2008 - 03:16 PM

I just recently created a program in visual c++ express 2008. The execute runs fine on my machine. However when I try to run it on another XP machine, I get an error on execution saying:

Quote

This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.


Anyone know of anything special that VC++2008 might have put onto my machine? My program is not anything too elaborate.

Is This A Good Question/Topic? 0
  • +

Replies To: Visual C++ program won't run on another PC?

#2 skaoth  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 91
  • View blog
  • Posts: 601
  • Joined: 07-November 07

Re: Visual C++ program won't run on another PC?

Posted 04 April 2008 - 03:47 PM

If I'm not mistaken the 2k8 versions of VS or VC++ use the 3.5 framework by default. This may mean that you need to install this framework on the other computer for your executable to work.

Give that a try and see if it resolves the issue
Was This Post Helpful? 0
  • +
  • -

#3 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,507
  • Joined: 12-July 02

Re: Visual C++ program won't run on another PC?

Posted 05 April 2008 - 04:34 AM

That only holds true if the user is programming in Managed C++. Is that the case, or are you using actual C++?
Was This Post Helpful? 0
  • +
  • -

#4 geewhiz  Icon User is online

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 54
  • Joined: 20-August 07

Re: Visual C++ program won't run on another PC?

Posted 05 April 2008 - 09:29 AM

All of my code is in actual/unmanaged c++.

This post has been edited by geewhiz: 05 April 2008 - 09:34 AM

Was This Post Helpful? 0
  • +
  • -

#5 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,507
  • Joined: 12-July 02

Re: Visual C++ program won't run on another PC?

Posted 05 April 2008 - 11:14 AM

Are you simply transferring the executable file to another machine and trying it?
Was This Post Helpful? 0
  • +
  • -

#6 geewhiz  Icon User is online

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 54
  • Joined: 20-August 07

Re: Visual C++ program won't run on another PC?

Posted 07 April 2008 - 01:05 PM

View PostAmadeus, on 5 Apr, 2008 - 11:14 AM, said:

Are you simply transferring the executable file to another machine and trying it?


Yes. This is a program that should be able to run on any win machine.

I am using the CreateProcess processor class in one section. Could this be the problem?
Was This Post Helpful? 0
  • +
  • -

#7 geewhiz  Icon User is online

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 54
  • Joined: 20-August 07

Re: Visual C++ program won't run on another PC?

Posted 07 April 2008 - 02:18 PM

I just copied/pasted my code from 2008 Express into VisualC++6.0. It compiles and runs without any problems on other PCs.

Must be something different with the compilers, but I don't know what?
Was This Post Helpful? 0
  • +
  • -

#8 geewhiz  Icon User is online

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 54
  • Joined: 20-August 07

Re: Visual C++ program won't run on another PC?

Posted 07 April 2008 - 02:28 PM

This is hilarious.

After saving my project in C++6, if I double click it, winblozes tries to open with the now default editor, C2008 Express. Upon opening, it asks to do a conversion:

Quote

The project 'TrinityProcessChecker-C6.dsp' must be converted to the current Visual C++ project format. After it has been converted, you will not be able to edit this project in previous versions of Visual Studio.

Convert and open this project?


HuH? My code is unmanaged c++. Why the conversion?

Translation: "Let me take over your code!!" hmmmm.
Was This Post Helpful? 0
  • +
  • -

#9 jeronimo0d0a  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 146
  • Joined: 03-March 08

Re: Visual C++ program won't run on another PC?

Posted 07 April 2008 - 04:26 PM

View Postgeewhiz, on 7 Apr, 2008 - 02:28 PM, said:

Translation: "Let me take over your code!!" hmmmm.

It wants to take over your project, not your code. You have a .prj file that defines the project for C++ compiler. If you want to truly write portable windows programs and they aren't all that complicated, get an older compiler, there are plenty available for free. Target win95. studio 2008 is not all that backward compatible, especially the express. If it works with 2006, you can rename the project .pr6 when you click it, it will ask what program you want to use. VB has the same issues.

This post has been edited by jeronimo0d0a: 07 April 2008 - 04:29 PM

Was This Post Helpful? 0
  • +
  • -

#10 skaoth  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 91
  • View blog
  • Posts: 601
  • Joined: 07-November 07

Re: Visual C++ program won't run on another PC?

Posted 07 April 2008 - 05:17 PM

I remember something related to this when I was using VC++ 6 and then
upgraded to VC++ 8 (2k5). I beleive the issue may have to do with the
MS c++ runtime.

It could very well be that your executable compiled with 2k8 requires
a runtime that isn't installed on the other machine.

Here is a blog talking about MS C++ runtime issues with 2k5.

http://www.mydigital...-free-download/

"Application software that is written and built with Visual C++ (VC++) Express SP1 or Visual Studio 2005 SP1 will need to have VC++ 8.0 runtime libraries installed on the computer that does not have Visual Studio or Visual C++ 5.0 installed. Else when users attempt to run and execute the program, the errors such as failed to load DLL, component is missing a required dependency, side-by-side configuration contains errors and etc may occur. "
Was This Post Helpful? 0
  • +
  • -

#11 Mikhail  Icon User is offline

  • Bastard Operator From Hell
  • member icon

Reputation: 58
  • View blog
  • Posts: 1,378
  • Joined: 26-October 07

Re: Visual C++ program won't run on another PC?

Posted 07 April 2008 - 05:31 PM

Well can't you use some other IDE excpet VSC++? This is the reason why I bash Visual Studio. ANSI C++/C should be written in something like Code::Block.
Was This Post Helpful? 0
  • +
  • -

#12 Cerolobo  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 52
  • View blog
  • Posts: 450
  • Joined: 05-April 08

Re: Visual C++ program won't run on another PC?

Posted 07 April 2008 - 06:47 PM

View Postgeewhiz, on 7 Apr, 2008 - 02:28 PM, said:

HuH? My code is unmanaged c++. Why the conversion?

Translation: "Let me take over your code!!" hmmmm.


The conversion doesn't mean VS will rewrite your code. You saved the project to a older version of the Visual Studio Solution. It wants to convert the Solution file (IDE settings, compiler flags, and a bunch of other information), to the version that you are using.

Anyway, you might have some luck with the command line version. I'm not quite familiar with the Express edition, but I'm willing to bet you can compile at the command line.

Check start -> Program Files -> Visual Studio Express (or what ever it's called) -> Visual Studio Tools -> And look for something with command prompt.

From there, you'll have to browse to where your source code files are, and then type in

cl <source files> /Fe"EXE NAME HERE"

If your using GDI+, or a few other things, you may need to add additional libraries.



Other then that, you might want to try one of the other free compilers. I know of two other GUI IDEs, Borland Turbo C++ and Bloodshed Dev C++.

I'm personally love GNU, but I tend to test my code on as many compilers as I can get my hands on.
Was This Post Helpful? 1
  • +
  • -

#13 geewhiz  Icon User is online

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 54
  • Joined: 20-August 07

Re: Visual C++ program won't run on another PC?

Posted 08 April 2008 - 11:59 AM

I was joking about the micro-nazi's taking over my code. :P

But check this out. I found a solution. It has things to do with the runtime environment, thanks skaoth. If anyone else is having this kind of problem check out Jeris's post:

Quote



It should fix ya up. :^:
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1