Solution for python22_d.lib
Sebastian Haase
seb_haase at yahoo.com
Thu Apr 4 14:11:36 EST 2002
Hi everybody!
Here is the issue:
Compiling a C/C++ program (that includes "python.h") with
VC++ in "debug-mode"
wants to link python22_d.lib. But this isn't part of the binary
python distribution.
Solution 1) -->> BAD!! <<-
downloading the python source and compile python (itself) in
debug-mode.
This was suggested to me in and others here in this group!
But the "stuff" you get/end-up-with doesn't work as well.
a) e.g numPy doesn't like it (see my [unanswered ;-( ] post ]
about "multiarray" last week - I tried to recompile it from
source - but
"python setup.py install" did't find the python libs
b) wxPython/"and lot's of other nice modules" don't install
properly because
they don't find the "standard file/dir structure" --> e.g. libs
are
somewere in "C:\python-2.2\PCbuild" !!!
=====
The REAL
Solution ! --> "we" are not really interested in debugging the python
lib !
======== ==> we only want to debug _our_ own C/C++ code!!!
just go into c:/Python22/include/pyconfig.h:
------------------------------
and change these lines: (starting line 331)
@code@
#if !defined(USE_DL_EXPORT) && defined(_MSC_VER)
/* So nobody using MSVC needs to specify the .lib in their Makefile
any
more (other compilers will still need to do so, but that's taken
care
of by the Distutils, so it's not a problem). */
#ifdef _DEBUG
// seb WHO has python22_d.lib ?? WE DON'T WANT TO DEBUG _PYTHON_
// seb #pragma comment(lib,"python22_d.lib")
#pragma comment(lib,"python22.lib")
#else
#pragma comment(lib,"python22.lib")
#endif
@/code@
the " // seb" - part refers to my changes!
----------------------------------------------------------------
--> so both debug and release can link against python22.lib.
----------------------------------------------------------------
This has caused me a lot of trouble -- and now I feel to be back on
track - since I can just use ALL the standard python-installations !!!
Regards,
Sebastian
PS: Maybe the above code should be taken out entirely !!! It causes
trouble ;-))
More information about the Python-list
mailing list