I'm sort of a beginner at coding and C++ but I have successfully created a few small programs. Now my problem is that if I send my friend the program I just wrote (using Microsoft Visual C++ compiler) they can't open it. They are using XP like me but it still gets an error. It is just a simple program that says hello world so it isn't like I wrote the program wrong. Help?

I'll bet my boots that you compiled the program for DEBUG. Change the setting to use RELEASE and it will probably work ok. How to change from debug to release depends on the version of the compiler you are using. If you already compiled for release then there couild be a thousand reasons why it won't run, including a lack of the correct DLLs.

Ah, Well that is something I didn't know I had to do. But it still doesn't work with release. How do include the correct DLLs? I've tried to look through microsoft help but it goes in circles.

What version of the compiler are you using? Are the operating systems on the two computers the same? Can you post the code to your program ? What are the exact error messages you get from the operating system when you try to run the program (copy/paste them here) ?

Visual C++ 2008 Express Ver. 3.5

Both computers are running Windows XP

#include <iostream>
#include <cstdlib>
using namespace std;

int main()
{
    cout << "Hello" << endl;
    system("PAUSE");
    return 0;
}

Error says

Application failed to start because its side-by-side configuration wasn't correct. Please see the application event log for more details.

This thread seems to have a discussion of your problem. Scroll down to post dated Oct 31 2005 at 1:15 pm the poster seems to present a solution. You should probably read all the posts in that thread.

I thought I was able to duplicate the problem. I compiled the program on Vista Home Premium using VC++ 2008 Express then rebooted into XP with SP2 and the program will not run becaise pf the useless error message "Incorrect Configuration". I turned off debug, unicode and turned off embedding the manifest and it still doesn't run on XP. I honestly don't know what to do next to correct the problem except continuing researching the problem with google. I'll let you know if I find out something, or hopefully someone else will know the solution. Since its compiled on Vista maybe there isn't a solution, but that's hard to believe.

You can download dependency walker application from:
http://www.dependencywalker.com/
Open your application in the dependency walker on your friends computer, that way you will see all the files that should be available but are not.
You may have to install some redistribution package on your friends computer.

You also might need to install .NET 2.0 Framework on your friend's computer depending on your projecttype.

Niek

[edit] here's a link [/edit]

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.