Hi,
I have searched the internet high and low but all posts I have found on this topic have been confusing to me... It is quite clear that there is something basic I am not getting... please help...

My applications are written in VC++ 2008 Express and all source code is included in my projects (no .dlls used, just #include <windows.h> etc). The debug exe files run fine on my PC which has VC++ Express which is OK for now. But if anyone could explain how to compile an exe file from a project that will run on a second PC without installation of anything that would be great. Keep it simple as I am new to this field... The file size can be big, that is no problem. I just want to be able to share an application without telling the user to install something other than my program. If I have to purchase something, what would that be? How much would it cost?

Thanks!

I've found that compiling from the command line gives an executable that will stand alone. At least for projects with a single source code file.

All you have to do is compile it for Release instead of Debug. You may have to install some Microsoft dll's found here: "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT" if the computer does not already have them or newer versions of them.

I've found that compiling from the command line gives an executable that will stand alone. At least for projects with a single source code file.

Interesting... My projects have many source code files but I should give it a shot and see if it works. What is the syntax for compiling from the command line?

Thanks!

All you have to do is compile it for Release instead of Debug. You may have to install some Microsoft dll's found here: "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT" if the computer does not already have them or newer versions of them.

With install, do you mean copy them over to the other PC or do they need to be installed with an installer to get entries in the registry? I see that my PC has 3 .dll files and one manifest in that location (slightly different path though). If the installation is just a copy, what target location should they reside in? The same?

Thanks!

Interesting... My projects have many source code files but I should give it a shot and see if it works. What is the syntax for compiling from the command line?

Thanks!

Look here

And see this for info on setting the project to statically link the libraries.

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.