application configuration incorrect error

Reply

Join Date: May 2007
Posts: 110
Reputation: hashinclude is an unknown quantity at this point 
Solved Threads: 8
hashinclude hashinclude is offline Offline
Junior Poster

application configuration incorrect error

 
0
  #1
Jan 13th, 2008
Hello everyone,

i have the following code

  1. #include <iostream>
  2. #include <conio.h>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. cout<<"\nPress Any Key To Continue ";
  8. getch();
  9. return 0;
  10. }

it compiles fine on my windows xp using microsoft visual c++ , and i can run the resultant executable file with no problems at all , but when i copy that executable file to another computer and try to run it i get an error that says "application failed to start because application configuration is incorrect".

help please.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,321
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 384
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: application configuration incorrect error

 
0
  #2
Jan 13th, 2008
What Operating System does you other computer have?

What happens if you take out the conio header and change it to:-

  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. cin.get();
  7. return 0;
  8. }
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 110
Reputation: hashinclude is an unknown quantity at this point 
Solved Threads: 8
hashinclude hashinclude is offline Offline
Junior Poster

Re: application configuration incorrect error

 
0
  #3
Jan 13th, 2008
Originally Posted by iamthwee View Post
What Operating System does you other computer have?

What happens if you take out the conio header and change it to:-

  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. cin.get();
  7. return 0;
  8. }
the other computer's OS is the same and i must use getch()
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,321
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 384
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: application configuration incorrect error

 
0
  #4
Jan 13th, 2008
The other things I can think of is that you might be using the dubug exe, as opposed to the release exe.

All program examples in [...] are built in Debug mode. To create a Release Mode version we have to change the Visual C++ project to a Release Mode. After rebuilding the program, the executable should be portable on Windows machine.
Last edited by iamthwee; Jan 13th, 2008 at 5:40 am.
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 110
Reputation: hashinclude is an unknown quantity at this point 
Solved Threads: 8
hashinclude hashinclude is offline Offline
Junior Poster

Re: application configuration incorrect error

 
0
  #5
Jan 13th, 2008
Originally Posted by iamthwee View Post
The other things I can think of is that you might be using the dubug exe, as opposed to the release exe.
indeed i was building in debug mode , i changed that and built in release mode but that didn't change anything and i still got the error
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,321
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 384
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: application configuration incorrect error

 
0
  #6
Jan 13th, 2008
What version of studio is it?

Make sure it doens't need the dotnet framework. I have never used visual c++ so I don't know.

This is why I like dev-cpp.
http://www.bloodshed.net/devcpp.html

I have no problems, and the exe generated is good to go on any windows machine.
Last edited by iamthwee; Jan 13th, 2008 at 7:38 am.
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 1,109
Reputation: vijayan121 is a splendid one to behold vijayan121 is a splendid one to behold vijayan121 is a splendid one to behold vijayan121 is a splendid one to behold vijayan121 is a splendid one to behold vijayan121 is a splendid one to behold 
Solved Threads: 169
vijayan121 vijayan121 is offline Offline
Veteran Poster

Re: application configuration incorrect error

 
0
  #7
Jan 13th, 2008
> but when i copy that executable file to another computer and try to run it i get an error
> that says "application failed to start because application configuration is incorrect".

you also need to copy the manifest file created when linking the application. (the manifest file contains information about the application's dependencies such as the runtime libraries.) the manifest file needs to be copied into the same location as the executable image (.exe).
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 110
Reputation: hashinclude is an unknown quantity at this point 
Solved Threads: 8
hashinclude hashinclude is offline Offline
Junior Poster

Re: application configuration incorrect error

 
0
  #8
Jan 13th, 2008
Originally Posted by vijayan121 View Post
> but when i copy that executable file to another computer and try to run it i get an error
> that says "application failed to start because application configuration is incorrect".

you also need to copy the manifest file created when linking the application. (the manifest file contains information about the application's dependencies such as the runtime libraries.) the manifest file needs to be copied into the same location as the executable image (.exe).
i copied a file with the extension "manifest" , but it didn't help , in my code , if i don't include "conio.h" , i stop getting the error , so the "conio" header file is causing this ?
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,321
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 384
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: application configuration incorrect error

 
0
  #9
Jan 13th, 2008
Are you saying the program works ok on the different system when you take out the conio.h and include the manifest file?
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 110
Reputation: hashinclude is an unknown quantity at this point 
Solved Threads: 8
hashinclude hashinclude is offline Offline
Junior Poster

Re: application configuration incorrect error

 
0
  #10
Jan 13th, 2008
Originally Posted by iamthwee View Post
Are you saying the program works ok on the different system when you take out the conio.h and include the manifest file?
when i take out the conio.h , it works without copying the manifest file but even when i had conio.h included , the manifest file didnt help
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 8446 | Replies: 16
Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2010 DaniWeb® LLC