MSVC6 "This application has failed to start " python24_d.dll &c

Discussion in 'Python' started by Bill Davy, May 20, 2005.

  1. Bill Davy

    Bill Davy Guest

    I am building a C++ program (main.exe) with VC6 which expects to call the
    Python DLL. When I start it (under the debugger), I get: "This application
    has failed to start because python24_d.dll was not found. Re-installing the
    application may fix this problem."

    I built Python24_d.dll using VS.NET 2003 (which I bought specifically for
    that purpose but cannot use for our project, boo hoo).

    I am building a debug version of main.exe which I linked with python24_d.lib
    (which is in the same directory as python24_d.dll).

    Under Settings | Debug | Additional DLL I have selected (using the IDE's
    browse facility) E:\Bill\Python-2.4.1\PCbuild\python24_d.dll as a DLL to be
    loaded at start up.

    Py_Main is referenced in the main.exe I have built. Using "dumpbin /all
    main.exe" the only reference to Python I can find is:


    4A2C94 Import Address Table

    4A268C Import Name Table

    0 time date stamp

    0 Index of first forwarder reference

    2D3 Py_Main

    "dumpbin /all python24_d.dll" runs well and shows Py_main is indeed at

    How can I find out what is going wrong?

    I cannot persuade the debugger to stop before the message is sent to trace
    it (which might not be much fun anyway, but I've done it for Python before

    Could the DLL be corrupt or inconsistent with the LIB file (perhaps because
    it was built from C)?

    Does it matter that in the Properties of Python24_d.dll it says the Original
    File Name was python24.dll

    Does it matter that my program (and MSVC6 etc) are in H: but the DLL is in

    LoadLibrary() documentation says the OS searchs PATH (not LIBPATH, of
    course). I have a PATH of "C:\Program Files\Microsoft Visual
    Studio\Common\Tools\WinNT;C:\Program Files\Microsoft Visual
    Studio\Common\MSDev98\Bin;C:\Program Files\Microsoft Visual
    Studio\Common\Tools;C:\Program Files\Microsoft Visual
    Studio\VC98\bin;C:\Program Files\Microsoft SDK\Bin\.;C:\Program
    Files\Microsoft SDK\Bin\WinNT\;E:\Bill\Python-2.4.1\PCbuild" (note the last



    PS And the file really does exist:

    E:\Bill\Python-2.4.1\PCbuild>dir E:\Bill\Python-2.4.1\PCbuild\python24*.*
    Volume in drive E is Data
    Volume Serial Number is 7864-C6B8

    Directory of E:\Bill\Python-2.4.1\PCbuild

    19/05/2005 15:00 2,568,192 python24_d.dll
    19/05/2005 15:00 114,047 python24_d.exp
    19/05/2005 15:00 189,890 python24_d.lib
    19/05/2005 15:00 2,935,808 python24_d.pdb
    4 File(s) 5,807,937 bytes
    0 Dir(s) 21,821,677,568 bytes free

    Bill Davy, May 20, 2005
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page