Question

Microsoft Visual Studio

Unable to start program '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.

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:

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
COMRES.DLL
CREDUI.DLL
CRYPT32.DLL
CRYPTUI.DLL
CSCDLL.DLL
DBGHELP.DLL
DEVMGR.DLL
DHCPCSVC.DLL
DNSAPI.DLL
DUSER.DLL
EFSADU.DLL
ESENT.DLL
GDIPLUS.DLL
HLINK.DLL
HNETCFG.DLL
IEFRAME.DLL
IERTUTIL.DLL
IEUI.DLL
IMAGEHLP.DLL
IMGUTIL.DLL
IMM32.DLL
INETCOMM.DLL
IPHLPAPI.DLL
LINKINFO.DLL
LZ32.DLL
MFC42U.DLL
MLANG.DLL
MOBSYNC.DLL
MPR.DLL
MPRAPI.DLL
MPRUI.DLL
MSASN1.DLL
MSGINA.DLL
MSHTML.DLL
MSI.DLL
MSIMG32.DLL
MSLS31.DLL
MSOERT2.DLL
MSRATING.DLL
MSSIGN32.DLL
MSVCP60.DLL
MSWSOCK.DLL
NETAPI32.DLL
NETCFGX.DLL
NETMAN.DLL
NETPLWIZ.DLL
NETRAP.DLL
NETSHELL.DLL
NETUI0.DLL
NETUI1.DLL
NETUI2.DLL
NORMALIZ.DLL
NTDSAPI.DLL
NTLANMAN.DLL
ODBC32.DLL
OLE32.DLL
OLEACC.DLL
OLEAUT32.DLL
OLEDLG.DLL
POWRPROF.DLL
PRINTUI.DLL
PSAPI.DLL
QUERY.DLL
RASAPI32.DLL
RASDLG.DLL
RASMAN.DLL
REGAPI.DLL
RTUTILS.DLL
SAMLIB.DLL
SCECLI.DLL
SETUPAPI.DLL
SHDOCVW.DLL
SHELL32.DLL
SHLWAPI.DLL
SHSVCS.DLL
TAPI32.DLL
URLMON.DLL
USERENV.DLL
USP10.DLL
UTILDLL.DLL
UXTHEME.DLL
VERSION.DLL
W32TOPL.DLL
WINHTTP.DLL
WININET.DLL
WINIPSEC.DLL
WINMM.DLL
WINSCARD.DLL
WINSPOOL.DRV
WINSTA.DLL
WINTRUST.DLL
WLDAP32.DLL
WMI.DLL
WS2_32.DLL
WS2HELP.DLL
WSOCK32.DLL
WTSAPI32.DLL
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"
Was it helpful?

Solution

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)

OTHER TIPS

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.

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

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.

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

Get it here

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.

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.

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

  1. Go to 'Build > Clean Solution'
  2. In the 'Solution Explorer' right click your project, and go to properties
  3. Make sure the configuration at the top left is 'Debug'
  4. Go to 'Linker > System > SubSystem' and change that to 'Not Set.' (If it's already set to 'Not Set' change it to 'Console.')
  5. Rebuild your program, if it fails to compile that's fine.
  6. Go back to 'Linker > System > SubSystem' and change it to what it previously was, and recompile.

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

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.

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

Follow these steps:

  1. Save the project in new folder.
  2. File; Move the source.cpp into the project.
  3. Build.
  4. Run.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top