New submission from Saul Spatz:

In trying to build a SWING module on Windows with 64-bit python, I get the 
linker errors listed at the bottom of this message.

I have this problem with both python 2.7 and 3.2.  I have built the project 
without problems on Windows with 32-bit python, and a correspondent informs me 
that it cam be built on linux with 64-bit python.

I have listed the exports from python32.lib with dumpbin, and in every case, 
the symbol after the __imp__ appears in the library without a leading 
underscore. For example, for the first unresolved symbol, 
__imp__PyBytes_AsStringAndSize, I find that PyBytes_AsStringAndSize appears in 
the library.  Of 1074 exports in the library, 891 do not have leading 
underscores, and the remainder do.  In the 32-bit library, every export starts 
with an underscore.   

This is obviously related to issues 15165 and 14286, but I hope this additional 
information will help locate the trouble.  I am running windows 7 professional, 
and I installed python by downloading and running the installer with all the 
defaults.

1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__PyBytes_AsStringAndSize referenced in function _SWIG_Python_str_AsChar
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__PyUnicodeUCS2_AsUTF8String referenced in function _SWIG_Python_str_AsChar
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__PyUnicodeUCS2_FromString referenced in function _SWIG_Python_str_FromChar
1>example_wrap.obj : error LNK2001: unresolved external symbol 
__imp__PyExc_RuntimeError
1>example_wrap.obj : error LNK2001: unresolved external symbol 
__imp__PyExc_AttributeError
1>example_wrap.obj : error LNK2001: unresolved external symbol 
__imp__PyExc_SystemError
1>example_wrap.obj : error LNK2001: unresolved external symbol 
__imp__PyExc_ValueError
1>example_wrap.obj : error LNK2001: unresolved external symbol 
__imp__PyExc_SyntaxError
1>example_wrap.obj : error LNK2001: unresolved external symbol 
__imp__PyExc_OverflowError
1>example_wrap.obj : error LNK2001: unresolved external symbol 
__imp__PyExc_ZeroDivisionError
1>example_wrap.obj : error LNK2001: unresolved external symbol 
__imp__PyExc_TypeError
1>example_wrap.obj : error LNK2001: unresolved external symbol 
__imp__PyExc_IndexError
1>example_wrap.obj : error LNK2001: unresolved external symbol 
__imp__PyExc_IOError
1>example_wrap.obj : error LNK2001: unresolved external symbol 
__imp__PyExc_MemoryError
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__PyInstanceMethod_New referenced in function _SWIG_PyInstanceMethod_New
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__PyErr_SetString referenced in function _SWIG_Python_SetErrorMsg
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__Py_BuildValue referenced in function __SWIG_Py_None
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__PyLong_FromVoidPtr referenced in function _SwigPyObject_long
1>example_wrap.obj : error LNK2019: unresolved external symbol __imp__Py_DecRef 
referenced in function _SwigPyObject_repr
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__PyUnicodeUCS2_Concat referenced in function _SwigPyObject_repr
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__PyUnicodeUCS2_FromFormat referenced in function _SwigPyObject_repr
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__PyBool_FromLong referenced in function _SwigPyObject_richcompare
1>example_wrap.obj : error LNK2001: unresolved external symbol 
__imp___Py_NotImplementedStruct
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__PyObject_Free referenced in function _SwigPyObject_dealloc
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__PyObject_CallFunctionObjArgs referenced in function _SwigPyObject_dealloc
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__PyObject_IsTrue referenced in function _SwigPyObject_own
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__PyArg_UnpackTuple referenced in function _SwigPyObject_own
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__PyType_Ready referenced in function _SwigPyObject_TypeOnce
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__PyObject_GenericGetAttr referenced in function _SwigPyObject_TypeOnce
1>example_wrap.obj : error LNK2001: unresolved external symbol 
__imp__PyBaseObject_Type
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__PyObject_SetAttr referenced in function _SWIG_Python_NewShadowInstance
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__PyObject_Call referenced in function _SWIG_Python_NewShadowInstance
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__PyErr_Clear referenced in function _SWIG_Python_GetModule
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__PyErr_Occurred referenced in function _SWIG_Python_GetModule
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__PyCapsule_Import referenced in function _SWIG_Python_GetModule
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__PyCapsule_GetPointer referenced in function _SWIG_Python_DestroyModule
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__PyModule_AddObject referenced in function _SWIG_Python_SetModule
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__PyCapsule_New referenced in function _SWIG_Python_SetModule
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__PyImport_AddModule referenced in function _SWIG_Python_SetModule
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__PyFloat_AsDouble referenced in function _SWIG_AsVal_double
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__PyLong_AsLong referenced in function _SWIG_AsVal_double
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__PyType_IsSubtype referenced in function _SWIG_AsVal_double
1>example_wrap.obj : error LNK2001: unresolved external symbol 
__imp__PyFloat_Type
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__PyLong_FromLong referenced in function _SWIG_From_int
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__PyArg_ParseTuple referenced in function __wrap_gcd
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__PyFloat_FromDouble referenced in function _Swig_var_Foo_get
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__PyUnicode_InternFromString referenced in function _swig_varlink_repr
1>example_wrap.obj : error LNK2001: unresolved external symbol 
__imp__PyExc_NameError
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__PyObject_Init referenced in function _SWIG_Python_newvarlink
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__PyObject_Malloc referenced in function _SWIG_Python_newvarlink
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp___PyObject_New referenced in function _SWIG_Python_NewPointerObj
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__PyDict_SetItemString referenced in function _SWIG_Python_InstallConstants
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__PyModule_GetDict referenced in function _PyInit__example
1>example_wrap.obj : error LNK2019: unresolved external symbol 
__imp__PyModule_Create2 referenced in function _PyInit__example

----------
components: Windows
messages: 168964
nosy: spatz123
priority: normal
severity: normal
status: open
title: Unresolved symbols in Windows 64-bit python
type: compile error
versions: Python 2.7, Python 3.2

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15772>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to