« Return to Thread: link error in debug mode

Re: link error in debug mode

by nitro-4 :: Rate this Message:

Reply to Author | View in Thread

>  >>> Or, just be sure you don't use any macro that enables the python  
> debug mode.
> I can't say that I've understood what I am supposed to do? Where do I  
> use these macros?

  From our wiki:

Modification to Python for building Debug libs

There are basically two options if you use VC 2005. Either you build
yourself a version of the python debug libs or do what I will describe
next. I am using the second way and never tried the first. Go into your
python/include folder. Open the pyconfig.h with an editor and change

#ifdef _DEBUG
#       define Py_DEBUG
#endif

to

#ifdef _DEBUG
//#     define Py_DEBUG
#endif

Second, change

#                       ifdef _DEBUG
#                               pragma comment(lib,"python24_d.lib")
#                       else
#                               pragma comment(lib,"python24.lib")
#                       endif /* _DEBUG */

to

#                       ifdef _DEBUG
#                               pragma comment(lib,"python24.lib")
#                       else
#                               pragma comment(lib,"python24.lib")
#                       endif /* _DEBUG */

This will ensure you don't get problems with errors about "some headers
are included with DEBUG defined, some without" and linking problems. If
you are on MSVS 2003, you won't get any problems at all.


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Swig-user mailing list
Swig-user@...
https://lists.sourceforge.net/lists/listinfo/swig-user

 « Return to Thread: link error in debug mode