On 2013-01-04 13:00+0100 Arjen Markus wrote:
> Hi Alan,
>
> well, explicitly setting PYTHON_LIBRARY does not work.
> At some point the python27_d.lib is still required and
> I have found where this is introduced into the object
> file (a thing which has puzzled me enormously):
>
> It is in the header file pyconfig.h, part of Python itself.
> There it is installed for MSVC using a pragma.
>
> We should probably document this!
Please go ahead and do that. I think the wiki is the right place.
But please be really specific so others know exactly what
happened to you and how to avoid that situation. We want to
avoid the situation where Windows users who want to try
Python are discouraged from doing that because you haven't
given enough specifics about the cause of the problem.
To help you get started with being specific please state that the issue is
due to the following section of pyconfig.h
/* For an MSVC DLL, we can nominate the .lib files used by extensions */
#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,"python27_d.lib")
# else
# pragma comment(lib,"python27.lib")
# endif /* _DEBUG */
# endif /* _MSC_VER */
# endif /* Py_BUILD_CORE */
#endif /* MS_COREDLL */
The above was in pyconfig.h that I downloaded from the official
Windows source at
http://www.python.org/ftp/python/2.7.1/python-2.7.1.msi which I
subsequently installed (under Wine) using
msiexec /i python-2.7.1.msi.
You should also state the details of where you got Python so users
know that the above code fragment comes from the official Python
source for Windows.
I assume the above section of pyconfig.h is the source of the general
issue. But what was the specific thing wrong on your platform? Was
it that you had #defined _DEBUG? Or does CMake do that for some
configurations? Certainly when running cmake.exe in a default way
under wine, I did not run into this issue, but I (and other successful
Python users on Windows) will not know why everything just worked for
us unless you are specific about what was wrong with your approach.
Alan
__________________________
Alan W. Irwin
Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).
Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________
Linux-powered Science
__________________________
------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
_______________________________________________
Plplot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-devel