"Unable to start program" (Debug build)

54,455

Solution 1

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)

Solution 2

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.

Solution 3

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

Solution 4

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

Solution 5

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.

Share:
54,455
heeen
Author by

heeen

Updated on September 06, 2020

Comments

  • heeen
    heeen over 3 years

    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"
    
  • Vilius Surblys
    Vilius Surblys about 15 years
    Have you also checked the call to the linker, to verify the libraries are as expected?
  • heeen
    heeen about 15 years
    added Dependency walker output to the question.
  • Dani van der Meer
    Dani van der Meer about 15 years
    I think you should be able to see which DLL(s) is causing the problem(s). it is not clear to me from the output you listed.
  • Adi
    Adi over 11 years
    Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.