visual studio run time problem
-
-
I build application using visual studio 2005 in release mode without MFC. but I need to install vc2005 run time to run the application . is there any settings in visual studio so that without installing vc2005 run time I can run my application .
Trioum
You can link your application with static copies of the library rather than the shared DLL copies. There is a setting for the linker to do this. Remember that linking statically increases the size of your EXE / DLL because all the required C Runtime Library and MFC / ATL libraries are included in your application. Of course, this is the tradeoff you make when you decide to not include the VS2005 redistributables in your kit / installation package.
-
You can link your application with static copies of the library rather than the shared DLL copies. There is a setting for the linker to do this. Remember that linking statically increases the size of your EXE / DLL because all the required C Runtime Library and MFC / ATL libraries are included in your application. Of course, this is the tradeoff you make when you decide to not include the VS2005 redistributables in your kit / installation package.
-
Project -> Properties -> Configuration Properties -> C/C++ -> Code Generation -> Runtime Library
. Set this to/MT
and/MTd
for Release mode and Debug mode respectively.«_Superman_» _I love work. It gives me something to do between weekends.
-
I build application using visual studio 2005 in release mode without MFC. but I need to install vc2005 run time to run the application . is there any settings in visual studio so that without installing vc2005 run time I can run my application .
Trioum
You don't HAVE to install visual studio, there's probably some dependencies that you need to distribute along with your application so that it'll be complete. Use a tool like Dependency Walker[^] to figure out what libraries you may be missing. You can then either include those libraries in your distribution OR build them into your executable statically (depending on what libraries you may be missing).
-
Project -> Properties -> Configuration Properties -> C/C++ -> Code Generation -> Runtime Library
. Set this to/MT
and/MTd
for Release mode and Debug mode respectively.«_Superman_» _I love work. It gives me something to do between weekends.
-
It is already set , if I installed vcredist_x86.exe then exe run , if uninstall then exe do not run . i am using Use Standard Windows Libraries in release mode
Trioum
Besides the setting for the C RTL (/MT etc...) you also need to check the Configuration Properties -> General for the "Use of MFC" and "Use of ATL". Both of those have a selection for "in a static library". The default to "use standard windows libraries" which means "shared DLL". I use VS2008 but I think they are in the same place in VS2005