please include python26_d.lib in the installer

2009-03-27 Thread Compie
I get this linker error
LINK : fatal error LNK1104: cannot open file 'python26_d.lib'
when I build the debug version of my Visual Studio project.

This is caused by the following lines in the file c:\Python26\include
\pyconfig.h
#   ifdef _DEBUG
#   pragma comment(lib,"python26_d.lib")
#   else
#   pragma comment(lib,"python26.lib")
#   endif /* _DEBUG */

The file python26_d.lib is not installed by the Python installer on
Windows.

So please:
1. Provide python26_d.lib in the installer.
or
2. Remove this automatic "pragma comment lib" from pyconfig.h, since I
can't disable it from the outside (as far as I know).

Please note: I want to build my own code in Debug mode for debugging.
I don't want to build or use the debug version of Python. I also can't
#undef _DEBUG, since the file that includes pyconfig.h (via Python.h)
is generated by SWIG. Also I prefer not to change pyconfig.h myself,
since my code needs to compile on a lot of different machines.
--
http://mail.python.org/mailman/listinfo/python-list


Re: please include python26_d.lib in the installer

2009-03-31 Thread Compie
On 27 mrt, 17:01, Carl Banks  wrote:
> OTOH, it's possible that SWIG and Python just happen to use the same
> macro to indicate debugging mode.  So I think you raise a valid point
> that this can be problematic.  Perhaps something like _Py_DEBUG should
> be used instead.

This would be a good solution IMHO. I'm not the only one facing this
problem. The internet is full of people looking for this file...
http://www.google.com/search?q=python25_d.lib+error+cannot

_DEBUG is automatically defined by Visual Studio when you build the
Debug version of a project.
http://msdn.microsoft.com/en-us/library/0b98s6w8.aspx

So I'm proposing: please use _PYTHON_DEBUG for this purpose. Would
this cause any problems?

Johan.
--
http://mail.python.org/mailman/listinfo/python-list


Re: please include python26_d.lib in the installer

2009-04-20 Thread Compie
On 31 mrt, 22:53, Carl Banks  wrote:
> On Mar 31, 12:50 pm, Compie  wrote:
>
> > On 27 mrt, 17:01, Carl Banks  wrote:
>
> > > OTOH, it's possible that SWIG and Python just happen to use the same
> > > macro to indicate debugging mode.  So I think you raise a valid point
> > > that this can be problematic.  Perhaps something like _Py_DEBUG should
> > > be used instead.
>
> > This would be a good solution IMHO. I'm not the only one facing this
> > problem. The internet is full of people looking for this 
> > file...http://www.google.com/search?q=python25_d.lib+error+cannot
>
> > _DEBUG is automatically defined by Visual Studio when you build the
> > Debug version of a 
> > project.http://msdn.microsoft.com/en-us/library/0b98s6w8.aspx
>
> > So I'm proposing: please use _PYTHON_DEBUG for this purpose. Would
> > this cause any problems?
>
> Go to bugs.python.org and file a bug report with the conflict it is
> causing you.  (Well, first, make sure no one else has reported it.)  I
> advise you to stress the downfalls of the current approach in a
> professional, respectful manner.  You have been coming off as slightly
> whiny in this thread, and that'll hurt your chances of getting such a
> change approved.  In particular, don't ask for anything, or ask why it
> was implemented that way; just report the issue and suggest a fix.
>
> I suspect they used _DEBUG deliberately.  I disagree with that: a
> generic symbol like _DEBUG should be avoided in general, and should
> really be avoided when it entails a change in interface.
>
> Carl Banks

Yes you are right, whining here won't help, I will file a bug report.

But I really needed the discussion here before I could do that. I
didn't know all the pros and cons of the current approach.
I was just reporting a problem that I (and many others) have with
pyconfig.h and Debug mode. But I do recognize that my current approach
(how I reported this problem) is not the most effective one. Thanks
for the tip.

Johan.
--
http://mail.python.org/mailman/listinfo/python-list