hello i wrote a c++ program, and i wanted to send it to my friends, but everytime i send the exe file to them, they tell me they get the error: "The application has failed to start because the application configuration is incorrect". I tried to put it on rapidshare, and i downloaded it to my computer, it ran. So i did a little research, and i dont really understand. is it because my friends have vista, or do i have to link staticaly (which idk how to do). Anyways the question is, how can i send the exe of a c++ to someone without sending them the code itself and then them compiling it. Thanks for any help.

static libraries go to Properties - Configuration Properties - C/C++ - Code Generation - Runtime Library and select either "Multi-threaded (/MT)" or "Multi-threaded Debug (/MTd). Otherwise, you'll have to distribute the runtimes with it.

ouch. I think express edition doesn't have the ability to statically link to libraries :icon_eek:

You will need to ship the libraries with your app. Check This Link, and hopefully you can get it to work that way. But personal suggestion: get a better compiler ;)

I personally would suggest using an IDE that's free and fully functional such as Code::Blocks which has a rich set of Features, a pretty good FAQ, and a forum. Personally, I'd download the version that comes with mingw (second link under windows).

You can do it in express. Right click your .cpp file and then properties. Works for me at least.

Comments
Nice Post. Clear and Accurate.

ok after i download it do i have to change my code at all, like the include statements, or will it just work if i paste the code in codeblocks? thanks for ur help..

You should be able to simply paste the code... though it would be interesting to know if MatEpp's suggestion works in your copy of Express.

i dont think so. i mean i right clicked it, then i clicked properties, and i didnt find anything about Runtime Library or "Multi-threaded (/MT)" or "Multi-threaded Debug (/MTd)... its just like a regular files properties. anyways that program blocks watever, i cant find the MT thing :( :(

try to zip it up. If you have visual studio 8. Then build your code.

Then open my computer. Go to C: , then find visual studi 2008. Then
find you project name. Then search the folder for .exe file.
Clik on it to make sure it works. Then right click the file, and go to send to, then Compressed(zipped) Folder. Then send it to whomever.

i dont think so. i mean i right clicked it, then i clicked properties, and i didnt find anything about Runtime Library or "Multi-threaded (/MT)" or "Multi-threaded Debug (/MTd)... its just like a regular files properties. anyways that program blocks watever, i cant find the MT thing :( :(

In Solution Explorer, right click your Project name & then Properties, it's then under Configuration Properties -> C/C++ -> Code Generation, it's near the middle "Runtime Library", change that to Multi-Threads (/MT) Although I will just note I'm not sure if it's the same under Express, as I haven't used the Express version of Visual Studio.

try to zip it up. If you have visual studio 8. Then build your code.

Then open my computer. Go to C: , then find visual studi 2008. Then
find you project name. Then search the folder for .exe file.
Clik on it to make sure it works. Then right click the file, and go to send to, then Compressed(zipped) Folder. Then send it to whomever.

He's not asking how to send it to someone else, he's asking why when he does send it to someone else it won't work on their computer, to which the reason is it's not able to link to the resources necessary, 1 of the easiest ways to solve that problem is to just statically link in all the necessary code.

i dont think so. i mean i right clicked it, then i clicked properties, and i didnt find anything about Runtime Library or "Multi-threaded (/MT)" or "Multi-threaded Debug (/MTd)... its just like a regular files properties. anyways that program blocks watever, i cant find the MT thing :( :(

Oh thats weird. I did it in 2005 edition just how Comatose explained.

Also if I remember right this problem can be solved by building your application as a Microsoft app instead of an empty clr project.

Or perhaps it had to be built as a Microsoft app for what Comatose is explaining to work.:-/

I thought of something last night. When clicking the .cpp file make sure you do that inside the IDE. I wasn't clear about that on my first post.

He's not asking how to send it to someone else, he's asking why when he does send it to someone else it won't work on their computer, to which the reason is it's not able to link to the resources necessary, 1 of the easiest ways to solve that problem is to just statically link in all the necessary code.

I just thought this he should give this a try. It works somethimes.

Edited 3 Years Ago by mike_2000_17: Fixed formatting

This article has been dead for over six months. Start a new discussion instead.