[Cython] error LNK2001: unresolved external symbol PyInit_init
Lisandro Dalcin
dalcinl at gmail.com
Thu Aug 21 13:30:10 CEST 2014
On 20 August 2014 20:25, Sturla Molden <sturla.molden at gmail.com> wrote:
> To build a Python extension for Win64 you must define the symbol MS_WIN64,
> typically -DMS_WIN64.
>
Sturla, isn't this supposed to be handled in pyconfig.h (at least when
using MSVC) ? I see these lines in PC/pyconfig.h (from Python
sources):
/* MSVC defines _WINxx to differentiate the windows platform types
Note that for compatibility reasons _WIN32 is defined on Win32
*and* on Win64. For the same reasons, in Python, MS_WIN32 is
defined on Win32 *and* Win64. Win32 only code must therefore be
guarded as follows:
#if defined(MS_WIN32) && !defined(MS_WIN64)
Some modules are disabled on Itanium processors, therefore we
have MS_WINI64 set for those targets, otherwise MS_WINX64
*/
#ifdef _WIN64
#define MS_WIN64
#endif
--
Lisandro Dalcin
---------------
CIMEC (UNL/CONICET)
Predio CONICET-Santa Fe
Colectora RN 168 Km 472, Paraje El Pozo
3000 Santa Fe, Argentina
Tel: +54-342-4511594 (ext 1016)
Tel/Fax: +54-342-4511169
More information about the cython-devel
mailing list