[Cython] error LNK2001: unresolved external symbol PyInit_init

Sturla Molden sturla.molden at gmail.com
Wed Aug 20 19:25:22 CEST 2014


To build a Python extension for Win64 you must define the symbol MS_WIN64,
typically -DMS_WIN64.

Sturla


Andriy Kornatskyy <andriy.kornatskyy at live.com> wrote:
> Here is an issue when trying to install wheezy.template (it uses
> cythonize) into environment with cython.
> 
> Host: windows 7 64bit Python version: 3.4.1 32 bit wheezy.template version: 0.1.151
> 
> When installing either from pip3 or downloading the source with python3 setup.py install
> 
> c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\link.exe /DLL
> /nologo /INCREMENTAL:NO /LIBPATH:C:\Python34\libs
> /LIBPATH:C:\Python34\PCbuild /EXPORT: PyInit_init
> build\temp.win32-3.4\Release\src\wheezy\template__init.obj /O
> UT:build\lib.win32-3.4\wheezy\template__init.pyd
> /IMPLIB:build\temp.win32-3.4 \Release\src\wheezy\template__init.lib
> /MANIFESTFILE:build\temp.win32-3.4\Rel ease\src\wheezy\template__init.pyd.manifest
> LINK : error LNK2001: unresolved external symbol PyInit_init
> build\temp.win32-3.4\Release\src\wheezy\template__init__.lib : fatal
> error LNK1120: 1 unresolved externals
> error: command 'c:\Program Files (x86)\Microsoft Visual Studio
> 10.0\VC\BIN\link.exe' failed with exit status 1120
> 
> Some details are here:
> https://bitbucket.org/akorn/wheezy.template/issue/10/installation-on-windows-fails
> 
> Thanks.
> 
> Andriy Kornatskyy



More information about the cython-devel mailing list