[XML-SIG] PyXML setup.py install - MSVC Compile Errors (error LNK2019: unresolved external symbol __imp__)

Paul Hudson phudson1442 at gmail.com
Thu Oct 25 22:10:44 CEST 2007


Hello Everyone,

I am attempting to setup PyXML under ActiveState's 64bit build of Python.  I
am running WinXP x64 on an AMD Opteron proc.
I am using Visual C++ 2003.
I referenced this page to get as far as I have:
http://www.vrplumber.com/programming/mstoolkit/   (I made the recommended
changes to msvccompiler.py)


When I run "python setup.py install", compilation gets to the linking stage
and then I get a lot of errors similar to this:
pyexpat.obj : error LNK2019: unresolved external symbol __imp__PyTuple_New
referenced in function _call_character_handler


I have found some info pointing to the "__imp__" prefix being the problem
and that this is caused by using __declspec( dllimport ).

I am not very experienced with compilation flags, definitions, declarations,
etc.


If anyone can offer some insight into what is causing these errors, it would
be very appreciated.



Thanks,
Paul







C:\dev\Python\source\PyXML-0.8.4>python setup.py install
running install
running build
running build_py
running build_ext
building '_xmlplus.parsers.pyexpat' extension
C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\VC7\BIN\cl.exe /c
/nologo /Ox /MD /W3 /GX /DNDEBUG -DXML_NS=1 -
DXML_DTD=1 -DBYTEORDER=1234 -DXML_CONTEXT_BYTES=1024 -DHAVE_MEMMOVE=1
-DXML_STATIC= -Iextensions/expat/lib -Ic:\python24
\include -Ic:\python24\PC /Tcextensions/pyexpat.c /Fobuild\temp.win32-
2.4\Release\extensions/pyexpat.obj
cl : Command line warning D4029 : optimization is not available in the
standard edition compiler
pyexpat.c
C:\Program Files (x86)\Microsoft Visual Studio .NET 2003\VC7\BIN\link.exe
/DLL /nologo /INCREMENTAL:NO /LIBPATH:c:\pytho
n24\libs /LIBPATH:c:\python24\PCBuild /EXPORT:initpyexpat build\temp.win32-
2.4\Release\extensions/pyexpat.obj build\temp
.win32-2.4\Release\extensions/expat/lib/xmlparse.obj build\temp.win32-
2.4\Release\extensions/expat/lib/xmlrole.obj build
\temp.win32-2.4\Release\extensions/expat/lib/xmltok.obj/OUT:build\lib.win32-
2.4\_xmlplus\parsers\pyexpat.pyd /IMPLIB:bu
ild\temp.win32-2.4\Release\extensions\pyexpat.lib
   Creating library build\temp.win32-2.4\Release\extensions\pyexpat.lib and
object build\temp.win32-2.4\Release\extensions\pyexpat.exp
pyexpat.obj : error LNK2019: unresolved external symbol __imp__PyTuple_New
referenced in function _call_character_handler
pyexpat.obj : error LNK2019: unresolved external symbol
__imp__PyUnicodeUCS2_DecodeUTF8 referenced in function
_conv_string_len_to_unicode
pyexpat.obj : error LNK2019: unresolved external symbol
__imp___Py_NoneStruct referenced in function _conv_string_len_to_unicode
pyexpat.obj : error LNK2019: unresolved external symbol
__imp__PyString_FromStringAndSize referenced in function
_conv_string_len_to_utf8
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/xml-sig/attachments/20071025/b06d60be/attachment.htm 


More information about the XML-SIG mailing list