Mailing List Archive

Debugging embedded pgm under WinNT
I have Python 1.5.2 embedded in an application on WinNT (4.0, SP4) using
Visual C++ 6.0 SP2. When I compile the project in Debug mode, even
though it links correctly to the python15_d.lib file, it won't run
because it complains about "can't find python15_d.dll". So I got the
source, compiled the python15_d.dll, put it in WINNT/system32 right next
to python15.dll, ran my program . . . and now it couldn't find
"multiarray" (my embedded Python code uses the Numeric extensions). I
verified that sys.path was correct and included the Numeric directories.
Do I have to build the Numeric extensions under Debug mode? Anybody
seen something like this before? Thanks in advance . . .
--
Kevin Rodgers krodgers@tdyryan.com kmrodgers@my-deja.com


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Debugging embedded pgm under WinNT [ In reply to ]
From: David Ascher <da@ski.org>

On Fri, 2 Jul 1999, Gordon McMillan wrote:

> > WINNT/system32 right next to python15.dll, ran my program . . . and
> > now it couldn't find "multiarray" (my embedded Python code uses the
> > Numeric extensions). I verified that sys.path was correct and
> > included the Numeric directories. Do I have to build the Numeric
> > extensions under Debug mode?

FWIW, I have a version of compile.py (the thing which builds Numeric)
which, when debugged, will allow building multiple versions automatically,
both Release and Debug (thanks to MHammond).

--david
Debugging embedded pgm under WinNT [ In reply to ]
From: "Gordon McMillan" <gmcm@hypernet.com>

Kevin Rodgers wrote:

> I have Python 1.5.2 embedded in an application on WinNT (4.0, SP4)
> using Visual C++ 6.0 SP2. When I compile the project in Debug mode,
> even though it links correctly to the python15_d.lib file, it won't
> run because it complains about "can't find python15_d.dll". So I
> got the source, compiled the python15_d.dll, put it in
> WINNT/system32 right next to python15.dll, ran my program . . . and
> now it couldn't find "multiarray" (my embedded Python code uses the
> Numeric extensions). I verified that sys.path was correct and
> included the Numeric directories. Do I have to build the Numeric
> extensions under Debug mode?

Yup. A pain in the butt, ain't it?

Everything has to be running the same c runtime lib. However, you can
compile python15.dll and your stuff in debug mode but using the
release c runtime (Multithreaded DLL). This at least lets you debug
your stuff and step into python15.dll. Other stuff will load, but
won't have any symbols. As I recall I had to tweak quite a few
things in the build to get that to work, too.

- Gordon
Debugging embedded pgm under WinNT [ In reply to ]
From: krodgers@tdyryan.com

I have Python 1.5.2 embedded in an application on WinNT (4.0, SP4) using
Visual C++ 6.0 SP2. When I compile the project in Debug mode, even
though it links correctly to the python15_d.lib file, it won't run
because it complains about "can't find python15_d.dll". So I got the
source, compiled the python15_d.dll, put it in WINNT/system32 right next
to python15.dll, ran my program . . . and now it couldn't find
"multiarray" (my embedded Python code uses the Numeric extensions). I
verified that sys.path was correct and included the Numeric directories.
Do I have to build the Numeric extensions under Debug mode? Anybody
seen something like this before? Thanks in advance . . .
--
Kevin Rodgers krodgers@tdyryan.com kmrodgers@my-deja.com


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Debugging embedded pgm under WinNT [ In reply to ]
On Fri, 2 Jul 1999, Gordon McMillan wrote:

> > WINNT/system32 right next to python15.dll, ran my program . . . and
> > now it couldn't find "multiarray" (my embedded Python code uses the
> > Numeric extensions). I verified that sys.path was correct and
> > included the Numeric directories. Do I have to build the Numeric
> > extensions under Debug mode?

FWIW, I have a version of compile.py (the thing which builds Numeric)
which, when debugged, will allow building multiple versions automatically,
both Release and Debug (thanks to MHammond).

--david
Debugging embedded pgm under WinNT [ In reply to ]
Kevin Rodgers wrote:

> I have Python 1.5.2 embedded in an application on WinNT (4.0, SP4)
> using Visual C++ 6.0 SP2. When I compile the project in Debug mode,
> even though it links correctly to the python15_d.lib file, it won't
> run because it complains about "can't find python15_d.dll". So I
> got the source, compiled the python15_d.dll, put it in
> WINNT/system32 right next to python15.dll, ran my program . . . and
> now it couldn't find "multiarray" (my embedded Python code uses the
> Numeric extensions). I verified that sys.path was correct and
> included the Numeric directories. Do I have to build the Numeric
> extensions under Debug mode?

Yup. A pain in the butt, ain't it?

Everything has to be running the same c runtime lib. However, you can
compile python15.dll and your stuff in debug mode but using the
release c runtime (Multithreaded DLL). This at least lets you debug
your stuff and step into python15.dll. Other stuff will load, but
won't have any symbols. As I recall I had to tweak quite a few
things in the build to get that to work, too.

- Gordon