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

B

Bill Davy

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:

python24_d.dll

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
0x2d3.

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
now).

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
E:?

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
entry).

TIA

Bill

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

E:\Bill\Python-2.4.1\PCbuild>
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top