how to build an c++ executable that can be run on another computer
Hi -
I have a small console app that takes two arguments from the command line, sorts through the text in the file specified by the first argument, picks out bits of information and throws it into a file specified in the second argument. I wrote the c++ code and everything is working alright on the build machine(the computer with MS Visual C++ Express 2010 on it. But i want to make an executable that another computer can execute without having to install anything on the second computer. I work in an office building so the computers that this program will run on are all standard builds (i.e. optiplex 760 and etc.). They have .NET framework v1.0.3705, 1.0 Hotfix, .net 1.1 security update, .net framework 2.0 service pack 1 and .net framework 3.0 service pack 1 installed on them. So far i've built a release version of my code in MSVC++ added msvcp100.dll and msvcr100.dll to the directory and copy/pasted it onto the new computer. I get this error message:
"To run this application, you first must install one of the following versions of the .NET framwork: v4.0.30319 Contact your application publisher for instructions about obtaining the appropriate version of the .NET framework"
It's a hassle to install anything on these office computers, so is there a way to build the simple c++ program i wrote to make it utilize the .NET framework version(s) that are already on the computer?
Re: how to build an c++ executable that can be run on another computer
I don't have VS2010 installed so unless you find an option to build for .net 3 you have to switch to using VS2008 instead (it was still downloadable last time I checked).
Re: how to build an c++ executable that can be run on another computer
Quote:
so is there a way to build the simple c++ program i wrote to make it utilize the .NET framework version(s) that are already on the computer?
First of all, c++ programs that utilizes .NET frameworks are discussed in another forum related to managed c++.
Second, VS2010 is claimed by MS to be able to support any .NET framework ever released before, so it's very probable you merely have to make corresponding changes in your project settings regarding target framework.
Third, you cannot expect to build with the most recent VS and have the resultant executable running with no problem in any system. People typically distribute programs in form of installation packages, when installer solves dependencies. Otherwise, they build with VC++6 or VC++7. :)
And the last thing. "Simple c++ program that utilizes .NET framework" tells me nothing. It's always good to see some code sample, ready to build if possible.
Re: how to build an c++ executable that can be run on another computer
I dont know about VC++ 2010, but if it would be about VS08 then using /MT at the RunTime Library from project settings can make your application run on any computer.
Re: how to build an c++ executable that can be run on another computer
Are you using the .NET framework? Looks like this is a C++/CLI program, not C++. If you don't want the managed components, create a simple Win32 Console Application project. You'll still need the C runtime library (msvcrXX.dll) and C++ runtime library (msvcpXX.dll) (XX stands for the right version) on the target machine, but you can put them in the same folder with your application.
Trying to execute a VC++ 2008 build on another computer
Hi -
I made a build of a working program in VC++ 2008 on a computer with .NET framework 2.0 service pack 2, .NET framework 3.0 SP2, .NET Frmwrk 3.5 SP1, and .NET 4.0. I want execute this program on standard office computers (every computer comes with the same software loaded on them and they don't change often). The computers have: .NET Framework v1.0.3705, .NET 1.1, .NET 2.0 SP1, and .NET 3.0 SP1. Is there a compatibility issue here? And if so, what should i do?
Re: Trying to execute a VC++ 2008 build on another computer
If you're building a native C++ application you either have need to install the VC9 runtime on each target machine or link your application statically.
Re: Trying to execute a VC++ 2008 build on another computer
[ merged threads ]
@rylar, please don't create multiple threads for the same topic.