Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > python23_d.lib

Reply
Thread Tools

python23_d.lib

 
 
Shankar KN
Guest
Posts: n/a
 
      06-11-2004
Hi,

I am trying to get a hand on python23_d.lib but in vain.
I am developing a C++ dll which has a SWIG interface to the Python world.
After installing Python and SWIG I am able to build this DLL in Release mode
but not in Debug mode beacuse of non-availability of python23_d.lib.

Any clues as to how I could proceed with Debug build?

Thanks,
With best regards,
Shankar


 
Reply With Quote
 
 
 
 
Gary Herron
Guest
Posts: n/a
 
      06-11-2004
On Friday 11 June 2004 09:59 am, Shankar KN wrote:
> Hi,
>
> I am trying to get a hand on python23_d.lib but in vain.
> I am developing a C++ dll which has a SWIG interface to the Python world.
> After installing Python and SWIG I am able to build this DLL in Release
> mode but not in Debug mode beacuse of non-availability of python23_d.lib.
>
> Any clues as to how I could proceed with Debug build?
>
> Thanks,
> With best regards,
> Shankar


I just copied python23.lib to the proper spot renaming it to
python23_d.lib. I suppose this is not an ideal solution, but it did
shutup the complaints so I could proceed.

Perhaps someone (else) can provide a "real" solution,

Gary Herron






 
Reply With Quote
 
 
 
 
Thomas Heller
Guest
Posts: n/a
 
      06-11-2004
"Shankar KN" <(E-Mail Removed)> writes:

> Hi,
>
> I am trying to get a hand on python23_d.lib but in vain.
> I am developing a C++ dll which has a SWIG interface to the Python world.
> After installing Python and SWIG I am able to build this DLL in Release mode
> but not in Debug mode beacuse of non-availability of python23_d.lib.
>
> Any clues as to how I could proceed with Debug build?


Get the Python sources and make a debug build.

Thomas


 
Reply With Quote
 
Steve Menard
Guest
Posts: n/a
 
      06-11-2004
Shankar KN wrote:
> Hi,
>
> I am trying to get a hand on python23_d.lib but in vain.
> I am developing a C++ dll which has a SWIG interface to the Python world.
> After installing Python and SWIG I am able to build this DLL in Release mode
> but not in Debug mode beacuse of non-availability of python23_d.lib.
>
> Any clues as to how I could proceed with Debug build?
>
> Thanks,
> With best regards,
> Shankar
>
>


What I usually is grab the sources and create a debug build myself.
SHould be pretty easy and painless to do no matter what platform you
use. keep in mind its not only the python23_d.lib that you need, but
also the python_d.exe and python23_d.dll, along with _d version of any
extension modules you use.

python the _d versions in the same place you find the regular works for me.

Steve
 
Reply With Quote
 
Bryan
Guest
Posts: n/a
 
      06-12-2004
Shankar KN wrote:
> Hi,
>
> I am trying to get a hand on python23_d.lib but in vain.
> I am developing a C++ dll which has a SWIG interface to the Python world.
> After installing Python and SWIG I am able to build this DLL in Release mode
> but not in Debug mode beacuse of non-availability of python23_d.lib.
>
> Any clues as to how I could proceed with Debug build?
>
> Thanks,
> With best regards,
> Shankar
>
>


this is the simplest approach i've found. i just add this around the python.h include.

#ifdef _DEBUG
#include <Python.h>
#define _DEBUG
#else
#include <Python.h>
#endif


bryan
 
Reply With Quote
 
Miki Tebeka
Guest
Posts: n/a
 
      06-13-2004
Hello Bryan,

> this is the simplest approach i've found. i just add this around the
> python.h include.
>
> #ifdef _DEBUG

I think the following line is missing.
#undef _DEBUG
> #include <Python.h>
> #define _DEBUG
> #else
> #include <Python.h>
> #endif


Bye.
--
-------------------------------------------------------------------------
Miki Tebeka <(E-Mail Removed)>
The only difference between children and adults is the price of the toys.

 
Reply With Quote
 
Bryan
Guest
Posts: n/a
 
      06-13-2004
Miki Tebeka wrote:
> Hello Bryan,
>
>
>>this is the simplest approach i've found. i just add this around the
>>python.h include.
>>
>>#ifdef _DEBUG

>
> I think the following line is missing.
> #undef _DEBUG
>
>>#include <Python.h>
>>#define _DEBUG
>>#else
>>#include <Python.h>
>>#endif

>
>
> Bye.
> --


yes, of course... sorry, i shoud have copied it from me code instead of just writing it here.

thanks,

bryan
 
Reply With Quote
 
Shankar KN
Guest
Posts: n/a
 
      06-15-2004
Hi,

Thanks for the reply.
But the problem persists.

There is only place where I do a #include <Python.h> (its in a .i file)
I did what you suggested around this include.

the problem is that running SWIG on this .i generates a .cxx file which we
don't want to modify.
This .cxx file has multiple occurences of #include <Python.h>, and only one
occurence gets the "guard" against _DEBUG.

Am I missing something here?


"Bryan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Miki Tebeka wrote:
> > Hello Bryan,
> >
> >
> >>this is the simplest approach i've found. i just add this around the
> >>python.h include.
> >>
> >>#ifdef _DEBUG

> >
> > I think the following line is missing.
> > #undef _DEBUG
> >
> >>#include <Python.h>
> >>#define _DEBUG
> >>#else
> >>#include <Python.h>
> >>#endif

> >
> >
> > Bye.
> > --

>
> yes, of course... sorry, i shoud have copied it from me code instead of

just writing it here.
>
> thanks,
>
> bryan



 
Reply With Quote
 
Bryan
Guest
Posts: n/a
 
      06-15-2004
Shankar KN wrote:
> Hi,
>
> Thanks for the reply.
> But the problem persists.
>
> There is only place where I do a #include <Python.h> (its in a .i file)
> I did what you suggested around this include.
>
> the problem is that running SWIG on this .i generates a .cxx file which we
> don't want to modify.
> This .cxx file has multiple occurences of #include <Python.h>, and only one
> occurence gets the "guard" against _DEBUG.
>
> Am I missing something here?
>
>



sorry, i don't use swig, so i'm no going be able to help you with that. but couldn't you write a python post-process
script that modifies the file automatically when compiled debug? if this is too much of a pain, then maybe compiling a
debug version of python would be your simplest solution.

bryan
 
Reply With Quote
 
Tonetheman
Guest
Posts: n/a
 
      06-22-2004
The real problem that you are having is from these lines in the
pyconfig.h file that you include.
#ifdef MS_COREDLL
# ifndef Py_BUILD_CORE /* not building the core - must be an ext */
# if defined(_MSC_VER)
/* So MSVC users need not specify the .lib file in
their Makefile (other compilers are generally
taken care of by distutils.) */
# ifdef _DEBUG
# pragma comment(lib,"python23_d.lib")
# else
# pragma comment(lib,"python23.lib")
# endif /* _DEBUG */
# endif /* _MSC_VER */
# endif /* Py_BUILD_CORE */
#endif /* MS_COREDLL */

So if you want you should be able to change your source to something
like this:

#undef _DEBUG
#include <python.h>
#define _DEBUG

Or if you want to you could just hack up pyconfig.h to remove the
pragma that forces the debug version library...

Or finally just get the sources and build the debug library yourself.

Tone



"Shankar KN" <(E-Mail Removed)> wrote in message news:<caco5i$q8j$(E-Mail Removed)>...
> Hi,
>
> I am trying to get a hand on python23_d.lib but in vain.
> I am developing a C++ dll which has a SWIG interface to the Python world.
> After installing Python and SWIG I am able to build this DLL in Release mode
> but not in Debug mode beacuse of non-availability of python23_d.lib.
>
> Any clues as to how I could proceed with Debug build?
>
> Thanks,
> With best regards,
> Shankar

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments