IT story

응용 프로그램을 올바르게 시작할 수 없습니다 (0xc000007b)

hot-time 2020. 6. 11. 08:25
반응형

응용 프로그램을 올바르게 시작할 수 없습니다 (0xc000007b)


단일 PC에서 개발 한 클라이언트 / 서버 앱이 있습니다. 이제 두 개의 직렬 포트가 필요하므로 친구로부터 PC를 빌 렸습니다.

앱을 빌드하고 실행하거나 디버그하려고하면 (Delphi IDE 또는 Windows 파일 관리자에서) "응용 프로그램을 제대로 시작할 수 없습니다 (0xc000007b)"오류가 발생합니다.

인터넷 검색은 많은 것을 가져 오지 않지만 델파이에만 해당되는 것이 아니며 다른 앱에서 발생한다는 것을 나타냅니다. 64 비트 응용 프로그램에서 32 비트 DLL을 호출하거나 그 반대로 인해 발생하는 것으로 보입니다.

  • 두 PC 모두 Windows 7, 64 비트
  • 둘 다 32 비트 만 처리 할 수있는 Delphi Xe2 스타터 에디션이 있습니다.
  • 내 PC에서는 앱이 제대로 실행되지만 친구의 컴퓨터에서는 실행되지 않습니다.
  • 다른 델파이 앱은 두 PC 모두에서 잘 작동합니다.

아무도 이것을 추적하는 방법에 대한 힌트를 줄 수 있습니까?


시작하려면 종속성 워커를 사용하여 응용 프로그램과 종속성 사이에 문제가 있는지 테스트하는 것이 좋습니다.


로드 시간 종속성을 해결할 수 없습니다. 이를 디버깅하는 가장 쉬운 방법은 Dependency Walker 를 사용하는 것 입니다. 로드 옵션의 진단 출력을 얻으려면 프로파일 옵션을 사용하십시오. 이것은 실패 지점을 식별하고 솔루션으로 안내해야합니다.

이 오류의 가장 일반적인 원인은 64 비트 DLL을 32 비트 프로세스로로드하거나 그 반대의 경우입니다.


누락 된 dll입니다. 아마도 COM 포트와 함께 작동하는 dll은 dll 의존성을 해결하지 못했을 것입니다. 종속성 워커 및 Windows 디버거를 사용할 수 있습니다. 예를 들어 모든 mfc 라이브러리를 확인하십시오. 또한 nrCommlib를 사용할 수 있습니다. com 포트와 함께 사용할 수있는 훌륭한 구성 요소입니다.


나는 여기에 명시된 모든 것을 시도하고 또 다른 대답을 찾았습니다. 32 비트 DLL로 응용 프로그램을 컴파일해야했습니다. 32 비트와 64 비트로 라이브러리를 구축했지만 PATH64 비트 라이브러리로 설정했습니다. 내 응용 프로그램을 다시 컴파일 한 후 (코드도 많이 변경됨)이 무서운 오류가 발생하여 이틀 동안 어려움을 겪었습니다. 마지막으로, 다른 많은 것들을 시도한 후에 PATH64 비트 DLL 앞에 32 비트 DLL을 갖도록 변경 했습니다 (같은 이름을 가짐). 그리고 효과가있었습니다. 완전성을 위해 여기에 추가하고 있습니다.


이전 답변에서 종속성 워커를 사용하는 것이 좋은 방법이라고 언급했습니다. 제 경우 (응용 프로그램이 오류 코드로 계속 실패합니다), 종속성 워커는 관련이없는 몇 가지 dll을 보여주었습니다!

마지막으로 "프로파일"메뉴로 이동하여 프로파일 링을 실행할 수 있으며 응용 프로그램을 실행하고 문제를 일으키는 정확한 dll에서 중지합니다. 32 비트 dll이 경로 때문에 선택되어 수정되었음을 알았습니다.

여기에 이미지 설명을 입력하십시오


최근에 직렬 포트를 사용하는 응용 프로그램을 개발하는 중 문제가 발생하여 테스트 한 모든 컴퓨터에서 작동했지만 몇 사람 이이 오류를 겪고있었습니다.

오류가 발생한 모든 컴퓨터가 Win7 x64를 실행 중이며 절대 업데이트가 없었습니다.

Windows 업데이트를 실행하면 특정 경우에 모든 컴퓨터가 해결되었습니다.


Microsoft Visual Studio 2012를 사용하여 클라이언트-서버 앱을 개발할 때도 같은 문제가 발생했습니다.

Visual Studio를 사용하여 앱을 개발 한 경우 새 소프트웨어 (예 : 소프트웨어가 개발되지 않은 컴퓨터)에 적절한 Microsoft Visual C ++ 재배포 가능 패키지가 있는지 확인해야합니다. 적절하게는 Visual C ++ 재배포 가능 패키지의 올바른 연도 및 비트 버전 (32 비트의 경우 x86 및 64 비트의 경우 x64)이 필요합니다.

Visual C ++ 재배포 가능 패키지는 Visual Studio를 사용하여 빌드 된 C ++ 응용 프로그램을 실행하는 데 필요한 런타임 구성 요소를 설치합니다.

다음은 Visual Studio 2015 용 Visual C ++ 재배포 가능 패키지에 대한 링크 입니다.

제어판-> 프로그램-> 프로그램 및 기능으로 이동하여 설치된 버전을 확인할 수 있습니다.

이 오류가 발생하여 수정 한 방법은 다음과 같습니다.

1) 컴퓨터에서 Visual Studio 2012를 사용하여 32 비트 응용 프로그램을 개발했습니다. 내 컴퓨터를 ComputerA라고하겠습니다.

2) .exe 및 관련 파일을 ComputerB라고하는 다른 컴퓨터에 설치했습니다.

3) ComputerB에서 .exe를 실행하고 오류 메시지가 나타납니다.

4) ComputerB에서 프로그램 및 기능을 살펴본 결과 Visual C ++ 2012 재배포 가능 패키지 (x64)가 표시되지 않았습니다.

5) ComputerB에서 Visual C ++ 2012 재배포 가능 패키지를 검색하고 x64 버전을 선택하여 설치했습니다.

6) ComputerB의 ComputerB에서 .exe를 실행했는데 오류 메시지가 나타나지 않습니다.


실제로이 오류는 잘못된 이미지 형식을 나타냅니다. 그러나 왜 이런 일이 발생하고 일반적으로 오류 코드가 의미합니까? 실제로 이것은 64 비트 Windows 운영 체제 용으로 만들거나 의도 된 프로그램을 실행하려고하지만 컴퓨터가 32 비트 운영 체제에서 실행중인 경우에 나타날 수 있습니다.

가능한 이유 :

  • Microsoft Visual C ++
  • 다시 시작해야 함
  • DirectX
  • .넷 프레임 워크
  • Need to Re-Install
  • Need to Run the application as an administrator

Source: http://www.solveinweb.com/solved-the-application-was-unable-to-start-correctly-0xc000007b-click-ok-to-close-the-application/


This may be a case where debugging the debugger might be useful. Essentially if you follow the instructions here you can run two ide's and one will debug into the other. If you un your application in one, you can sometimes catch errors that you otherwise miss. Its worth a try.


I have seen the error trying to run VC++ debug executable on a machine which did not have Visual C++ installed. Building a release version and using that fixed it.


In my case the error occurred when I renamed a DLL after building it (using Visual Studio 2015), so that it fits the name expected by an executable, which depended on the DLL. After the renaming the list of exported symbols displayed by Dependency Walker was empty, and the said error message "The application was unable to start correctly" was displayed.

So it could be fixed by changing the output file name in the Visual Studio linker options.


You can have this if you are trying to manifest your application that it has a dependancy on the Microsoft.Windows.Common-Controls assembly. You do this when you want to load Version 6 of the common controls library - so that visual styles are applied to common controls.

You probably followed Microsoft's original documentation way back from Windows XP days, and added the following to your application's manifest:

<!-- Dependancy on Common Controls version 6 -->
<dependency>
    <dependentAssembly>
        <assemblyIdentity
                type="win32"
                name="Microsoft.Windows.Common-Controls"
                version="6.0.0.0"
                processorArchitecture="X86"
                publicKeyToken="6595b64144ccf1df"
                language="*"/>
    </dependentAssembly>
</dependency>

Windows XP is no longer the OS, and you're no longer a 32-bit application. In the intervening 17 years Microsoft updated their documentation; now it's time for you to update your manifest:

<!-- Dependancy on Common Controls version 6 -->
<dependency>
    <dependentAssembly>
        <assemblyIdentity
                type="win32"
                name="Microsoft.Windows.Common-Controls"
                version="6.0.0.0"
                processorArchitecture="*"
                publicKeyToken="6595b64144ccf1df"
                language="*"/>
    </dependentAssembly>
</dependency>

Raymond Chen has a lovely history of the Common Controls:


Just solved this problem for my personal project (thanks to Dries for that). For me it was because the project path was too long. After saving the .sln to a shorter path (C:/MyProjects) and compiling from there it ran without the error.


Also download and unzip "Dependencies" into same folder where you put the wget.exe from

http://gnuwin32.sourceforge.net/packages/wget.htm

You will then have some lib*.dll files as well as wget.exe in the same folder and it should work fine.

(I also answered here https://superuser.com/a/873531/146668 which I originally found.)


I just ran into this issue. I searched for "C++" under my "Apps & Features" in Windows 10 control panel and noticed that some kind of update had just run a few days prior and installed VC++ Redistributable 2012-2017. The app that was running into the error message only required VC++ 2010. I uninstalled all of them and then reinstalled just 2010 x86/x64, and the error went away and the application functioned as expected.


어떤 이유로 x86 자원이 x64 시스템에서로드되는 경우 발생할 수 있습니다. 명시 적으로 피하기 위해이 전 처리기 지시문을 stdafx.h에 추가하십시오 (물론 예제에서 문제가되는 리소스는 Windows Common Controls DLL입니다.

#if defined(_WIN64)
#pragma comment(linker, "\"/manifestdependency:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df'\"")
#endif

시스템에 여러 버전의 dll이있을 수 있습니다. 시스템을 검색하여 찾을 수 있습니다. 경로의 디렉토리 순서를 변경하여 문제를 해결할 수도 있습니다. 이것은 내 문제였다. ( Qt 외부에서 Qt Creator GUI를 실행할 수 없습니다. "응용 프로그램을 제대로 시작할 수 없습니다 (0xc000007b)"오류 )

참고 URL : https://stackoverflow.com/questions/10492037/the-application-was-unable-to-start-correctly-0xc000007b

반응형