Visual C ++ / Studio: incorrect application setup?

My C (++) program, written and compiled using Visual C (++) / Visual Studio, works fine on my machine, but refuses to work on another machine. The error message I get is "This application could not be started because the application configuration is incorrect. Reinstalling the application may fix this problem."

+3
source share
10 answers

If you are writing a C ++ program, it is dynamically linked to a C or CRT runtime library for short. This library contains your printf, your malloc, your strtok, etc. The library is contained in the MSVCR80.DLL file. This file is not installed by default on Windows, so the application cannot work.

Decision? Either install the DLL on the target computer via VCREDIST.EXE (Visual C ++ redistributable package), or put a link to the CRT (connect the actual code for the functions used directly to your EXE).

VCREDIST - , : . : , C/++, " " Runtime Library , DLL. , .

+5

, DLL, , CRT (C Runtime Library). Dependency Walker (depend.exe), :

http://www.dependencywalker.com/

, , , exe, . Dependency Walker DLL , , .

+5

, Visual Studio (CRT ), ( ), VC .

Visual ++ :

Visual ++ 2005

Visual ++ 2005 SP1

Visual ++ 2008

: , , DLL.. p >

+1

.

++ → → "multi-threaded/MT"

. , , . .

→ " " → " "

( DLL- ) . DLL , ​​ .

+1

VC Redist Visual Studio. VC 8 :

\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\vcredist_x86
+1

........

EDIT: ( ) , , .. .. Depends.exe ieshims.dll wer.dll , . Multithreaded (/mt). , HAS , , InstallShield. installshield builder, , , . : V++ 9.0 CRT, V++ 9.0 DEBUG CRT CRM WinSXS MSM. , WinSXS .

DEBUG CRT: , ( , , , , ), Release - CRB DEBUG. , InstallShield DEBUG CRT WinSXS. - V++, , . , ​​ , DEBUG CRT WinSXS, . ( - .. - )

, , XP SP3, VMWare XP SP3 (.net 3.5 V++ 2008 RTM ), Mate XP .

, .

+1

,

#define _BIND_TO_CURRENT_VCLIBS_VERSION 1

_BIND_TO_CURRENT_VCLIBS_VERSION=1 .

, http://www.nuonsoft.com/blog/2008/10/29/binding-to-the-most-recent-visual-studio-libraries/

.

+1

- , .NET. .NET DLL, Visual Studio, , ​​Visual Studio. , , .

0

, , MFC, MFC. → /

0

.

Visual studio provides you with an option (default) for assembling a manifest for each assembly.

the manifest was placed in the release folder, but it was a different release folder than exe.

Even when using the configuration utilities, it was not packaged.

You should look for file names, for example, myprogram.exe.indermediate.manifest

If this is in the same folder as exe (and you have all the dlls), it should run

0
source

Source: https://habr.com/ru/post/1697185/


All Articles