“无法启动程序”(调试构建)

时间:2021-12-29 20:49:11

Microsoft Visual Studio

微软Visual Studio

Unable to start program 'theprogram.exe'.

无法启动程序“theprogram.exe”。

This application has failed to start because the application configuration is incorrect. Review the manifest file for possible errors. Reinstalling the application may fix this problem. For more details, please see the application event log.

由于应用程序配置不正确,该应用程序未能启动。检查清单文件中可能的错误。重新安装应用程序可以解决这个问题。有关详细信息,请参见应用程序事件日志。

OK

好吧

The program in question is a C++ project, no MFC, no AFX, used libraries are: opengl32.lib glu32.lib SDL.lib sdlmain.lib plus the pre-built libboost_signals-vc80-mt-gd-1_37.lib from BoostPro computing.

问题中的程序是一个c++项目,没有MFC,没有AFX,使用的库是:opengl32。*glu32。*SDL。*sdlmain。lib加上预构建的libboost_signals-vc80-mt-gd-1_37。*从BoostPro计算。

The program starts fine in Release builds, but on Debug I get the aforementioned error message, plus a zombie process attached to the debugger that I can't kill.

程序在发行版中启动良好,但是在调试时,我得到了前面提到的错误消息,以及一个附加到调试器的僵尸进程,我无法杀死它。

The manifest files for debug build:

用于调试构建的清单文件:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.VC80.DebugCRT" version="8.0.50608.0" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
    </dependentAssembly>
  </dependency>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50608.0" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
    </dependentAssembly>
  </dependency>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.VC80.DebugCRT" version="8.0.50727.762" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
    </dependentAssembly>
  </dependency>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50727.762" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
    </dependentAssembly>
  </dependency>
</assembly>

and Release build:

和发布构建:

<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type='win32' name='Microsoft.VC80.CRT' version='8.0.50608.0' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
    </dependentAssembly>
  </dependency>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
    </dependentAssembly>
  </dependency>
</assembly>

Dependency walker:

沃克的依赖:

Error: The Side-by-Side configuration information for "c:\prog\opengl guis\gg-0.7.0\debug\TUTORIAL.EXE" contains errors. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem (14001).
Error: At least one required implicit or forwarded dependency was not found.
Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
Error: Modules with different CPU types were found.
Warning: At least one delay-load dependency module was not found.
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.

DLLs:

dll:

DEVIL.DLL
ILU.DLL
MSVCP80D.DLL
MSVCR80D.DLL
SDL.DLL
DWMAPI.DLL
ADVAPI32.DLL
DCIMAN32.DLL
DDRAW.DLL
GDI32.DLL
GLU32.DLL
KERNEL32.DLL
MSVCRT.DLL
NTDLL.DLL
OPENGL32.DLL
RPCRT4.DLL
SECUR32.DLL
USER32.DLL
ACTIVEDS.DLL
ADSLDPC.DLL
ADVPACK.DLL
APPHELP.DLL
ATL.DLL
AUTHZ.DLL
BROWSEUI.DLL
CABINET.DLL
CDFVIEW.DLL
CERTCLI.DLL
CFGMGR32.DLL
CLBCATQ.DLL
CLUSAPI.DLL
COMCTL32.DLL
COMDLG32.DLL
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WZCDLG.DLL
WZCSAPI.DLL
WZCSVC.DLL
MSVCR80.DLL
TUTORIAL.EXE

linker call:

链接器调用:

/OUT:"C:\prog\OpenGL GUIS\GG-0.7.0\Debug\tutorial.exe" /INCREMENTAL /NOLOGO /LIBPATH:"C:\prog\SDL-1.2.13\lib" /LIBPATH:"C:\prog\contrib\lib_win32" /LIBPATH:"C:\prog\boost\boost_1_37\lib" /MANIFEST /MANIFESTFILE:"Debug\tutorial.exe.intermediate.manifest" /NODEFAULTLIB:"LIBC.LIB" /DEBUG /PDB:"c:\prog\OpenGL GUIS\GG-0.7.0\Debug\tutorial.pdb" /SUBSYSTEM:CONSOLE /MACHINE:X86 /ERRORREPORT:PROMPT opengl32.lib glu32.lib SDL.lib sdlmain.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ".\debug\gg.lib"

10 个解决方案

#1


3  

Looks like the debug build is linked against both debug and release runtimes which would be a very bad thing -- you haven't included either in the list of libraries you're linking against -- might be worth checking though

看起来调试构建是与调试和发布运行时链接在一起的,这将是一件非常糟糕的事情——您还没有将它们包括在您要链接的库列表中——但是这可能值得检查

Edit: Might also be worth checking for any #pragma comment (lib...) statements which can force the linker to include an additional library, causing potential conflicts (see also documentation on MSDN)

编辑:可能也值得检查任何#pragma注释(lib…)语句,它可以强制链接器包含一个额外的库,引起潜在的冲突(参见MSDN上的文档)

#2


5  

If you right click on the solution and go to Properties, you need to select Single Startup Project and select your hosting project. This worked for me.

如果您右键单击解决方案并进入属性,您需要选择单个启动项目并选择托管项目。这为我工作。

#3


2  

You've also got two different sets of versions listed in the manifest for the debug build!

在调试构建的清单中还列出了两组不同的版本!

It might be a bit different since you are on VS2005, but you might find something helpful in my question: App does not run with VS 2008 SP1 DLLs, previous version works with RTM versions

这可能有点不同,因为您在VS2005上,但是您可能会在我的问题中发现一些有用的东西:应用程序没有使用VS 2008 SP1 dll,以前的版本使用RTM版本

#4


1  

I had a very similar problem with Visual Studio 2005 C++ express. Installing the platform SDK, put the MSVCR80D dll in the right place, but VS didn't seem to find it.

我在Visual Studio 2005 c++ express遇到过一个非常类似的问题。安装平台SDK,把MSVCR80D dll放在正确的位置,但是VS似乎没有找到它。

Installing SP1 for VS Express, and a restart, solved the problem for me.

为VS Express安装SP1,重新启动,为我解决了这个问题。

Get it here

把它在这里

#5


1  

This sounds similar to the problem discussed in this Boost.Build thread. The possible solutions involve making sure you have selected to install all flavours of runtime, when installing Visual Studio, and using the sxstrace.exe tool to give more detailed diagnostic. However, in that cases nothing worked until Visual Studio was reinstalled from scratch.

这听起来与本文讨论的问题类似。建立线程。可能的解决方案包括确保您选择在安装Visual Studio时安装所有风格的运行时,并使用sxstrace。exe工具提供更详细的诊断。然而,在这种情况下,直到Visual Studio从头重新安装之前,没有任何工作是有效的。

#6


0  

Try to look in the application log like the error messages suggests. I would also try and use a tool like Dependency walker to find a possible missing/wrong DLL problem.

尝试像错误消息建议的那样查看应用程序日志。我还会尝试使用一个类似于Dependency walker的工具来查找可能丢失/错误的DLL问题。

#7


0  

This happens to me all the time! Here is a little trick I discovered to fix it:

这在我身上经常发生!下面是我发现的一个小窍门:

  1. Go to 'Build > Clean Solution'
  2. 转到“构建>清洁解决方案”
  3. In the 'Solution Explorer' right click your project, and go to properties
  4. 在“解决方案资源管理器”中,右键单击项目,然后转到属性
  5. Make sure the configuration at the top left is 'Debug'
  6. 确保左上角的配置是“Debug”
  7. Go to 'Linker > System > SubSystem' and change that to 'Not Set.' (If it's already set to 'Not Set' change it to 'Console.')
  8. 转到“Linker >系统>子系统”,并将其更改为“不设置”(如果它已经设置为“不设置”将其改为“控制台”)。
  9. Rebuild your program, if it fails to compile that's fine.
  10. 重新编译你的程序,如果它不能编译,那很好。
  11. Go back to 'Linker > System > SubSystem' and change it to what it previously was, and recompile.
  12. 回到“链接器>系统>子系统”并将其更改为以前的版本,然后重新编译。

Now, as to why this works, I'm not sure.

现在,我不确定为什么这行得通。

#8


0  

Had the same problem running an application that was compiled in Debug configuration. I was linking with an external library which had been linked with the Release version of the run-time library so I ended up with both Release and Debug run-times in the same process. Since I didn't have the Debug version of this external library I had to stick to Release build, cumbersome to debug but workable nonetheless.

运行在调试配置中编译的应用程序也有同样的问题。我正在链接一个与运行时库的发布版本链接的外部库,因此在同一个过程中,我得到了发布和调试运行时。由于我没有这个外部库的调试版本,所以我不得不坚持发布构建,虽然调试很麻烦,但仍然是可行的。

#9


0  

It looks like the same issue as described in this article: http://tmoniuszko.blogspot.com/2011/11/installing-service-pack-1-for-visual.html

它看起来与本文描述的问题相同:http://tmoniuszko.blogspot.com/2011/11/installing-service pack-1 for visual.html

#10


0  

Follow these steps:

遵循以下步骤:

  1. Save the project in new folder.
  2. 将项目保存在新文件夹中。
  3. File; Move the source.cpp into the project.
  4. 文件;移动源。cpp到这个项目中。
  5. Build.
  6. 构建。
  7. Run.
  8. 运行。

#1


3  

Looks like the debug build is linked against both debug and release runtimes which would be a very bad thing -- you haven't included either in the list of libraries you're linking against -- might be worth checking though

看起来调试构建是与调试和发布运行时链接在一起的,这将是一件非常糟糕的事情——您还没有将它们包括在您要链接的库列表中——但是这可能值得检查

Edit: Might also be worth checking for any #pragma comment (lib...) statements which can force the linker to include an additional library, causing potential conflicts (see also documentation on MSDN)

编辑:可能也值得检查任何#pragma注释(lib…)语句,它可以强制链接器包含一个额外的库,引起潜在的冲突(参见MSDN上的文档)

#2


5  

If you right click on the solution and go to Properties, you need to select Single Startup Project and select your hosting project. This worked for me.

如果您右键单击解决方案并进入属性,您需要选择单个启动项目并选择托管项目。这为我工作。

#3


2  

You've also got two different sets of versions listed in the manifest for the debug build!

在调试构建的清单中还列出了两组不同的版本!

It might be a bit different since you are on VS2005, but you might find something helpful in my question: App does not run with VS 2008 SP1 DLLs, previous version works with RTM versions

这可能有点不同,因为您在VS2005上,但是您可能会在我的问题中发现一些有用的东西:应用程序没有使用VS 2008 SP1 dll,以前的版本使用RTM版本

#4


1  

I had a very similar problem with Visual Studio 2005 C++ express. Installing the platform SDK, put the MSVCR80D dll in the right place, but VS didn't seem to find it.

我在Visual Studio 2005 c++ express遇到过一个非常类似的问题。安装平台SDK,把MSVCR80D dll放在正确的位置,但是VS似乎没有找到它。

Installing SP1 for VS Express, and a restart, solved the problem for me.

为VS Express安装SP1,重新启动,为我解决了这个问题。

Get it here

把它在这里

#5


1  

This sounds similar to the problem discussed in this Boost.Build thread. The possible solutions involve making sure you have selected to install all flavours of runtime, when installing Visual Studio, and using the sxstrace.exe tool to give more detailed diagnostic. However, in that cases nothing worked until Visual Studio was reinstalled from scratch.

这听起来与本文讨论的问题类似。建立线程。可能的解决方案包括确保您选择在安装Visual Studio时安装所有风格的运行时,并使用sxstrace。exe工具提供更详细的诊断。然而,在这种情况下,直到Visual Studio从头重新安装之前,没有任何工作是有效的。

#6


0  

Try to look in the application log like the error messages suggests. I would also try and use a tool like Dependency walker to find a possible missing/wrong DLL problem.

尝试像错误消息建议的那样查看应用程序日志。我还会尝试使用一个类似于Dependency walker的工具来查找可能丢失/错误的DLL问题。

#7


0  

This happens to me all the time! Here is a little trick I discovered to fix it:

这在我身上经常发生!下面是我发现的一个小窍门:

  1. Go to 'Build > Clean Solution'
  2. 转到“构建>清洁解决方案”
  3. In the 'Solution Explorer' right click your project, and go to properties
  4. 在“解决方案资源管理器”中,右键单击项目,然后转到属性
  5. Make sure the configuration at the top left is 'Debug'
  6. 确保左上角的配置是“Debug”
  7. Go to 'Linker > System > SubSystem' and change that to 'Not Set.' (If it's already set to 'Not Set' change it to 'Console.')
  8. 转到“Linker >系统>子系统”,并将其更改为“不设置”(如果它已经设置为“不设置”将其改为“控制台”)。
  9. Rebuild your program, if it fails to compile that's fine.
  10. 重新编译你的程序,如果它不能编译,那很好。
  11. Go back to 'Linker > System > SubSystem' and change it to what it previously was, and recompile.
  12. 回到“链接器>系统>子系统”并将其更改为以前的版本,然后重新编译。

Now, as to why this works, I'm not sure.

现在,我不确定为什么这行得通。

#8


0  

Had the same problem running an application that was compiled in Debug configuration. I was linking with an external library which had been linked with the Release version of the run-time library so I ended up with both Release and Debug run-times in the same process. Since I didn't have the Debug version of this external library I had to stick to Release build, cumbersome to debug but workable nonetheless.

运行在调试配置中编译的应用程序也有同样的问题。我正在链接一个与运行时库的发布版本链接的外部库,因此在同一个过程中,我得到了发布和调试运行时。由于我没有这个外部库的调试版本,所以我不得不坚持发布构建,虽然调试很麻烦,但仍然是可行的。

#9


0  

It looks like the same issue as described in this article: http://tmoniuszko.blogspot.com/2011/11/installing-service-pack-1-for-visual.html

它看起来与本文描述的问题相同:http://tmoniuszko.blogspot.com/2011/11/installing-service pack-1 for visual.html

#10


0  

Follow these steps:

遵循以下步骤:

  1. Save the project in new folder.
  2. 将项目保存在新文件夹中。
  3. File; Move the source.cpp into the project.
  4. 文件;移动源。cpp到这个项目中。
  5. Build.
  6. 构建。
  7. Run.
  8. 运行。