[lxml-dev] Use lxml under windows

Andreas Pakulat apaku at gmx.de
Tue Feb 14 11:20:49 CET 2006


Hi,

I'd like to use lxml under windows, but I can't compile the C extension:

C:\lxml-scoder2>python setup.py build -c mingw32
running build
running build_py
running build_ext
building 'lxml.etree' extension
creating build\temp.win32-2.4
creating build\temp.win32-2.4\Release
creating build\temp.win32-2.4\Release\src
creating build\temp.win32-2.4\Release\src\lxml
c:\Programme\CodeBlocks\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\libxml\inclu
de -IC:\Python24\include -IC:\Python24\PC -c src/lxml/etree.c -o build\temp.win3
2-2.4\Release\src\lxml\etree.o -w
writing build\temp.win32-2.4\Release\src\lxml\etree.def
c:\Programme\CodeBlocks\bin\gcc.exe -mno-cygwin -shared -s build\temp.win32-2.4\
Release\src\lxml\etree.o build\temp.win32-2.4\Release\src\lxml\etree.def -LC:\li
bxml\lib -LC:\Python24\libs -LC:\Python24\PCBuild -llibexslt -lzdll -llibxml2 -l
libxslt -liconv -lzlib -lpython24 -lmsvcr71 -o build\lib.win32-2.4\lxml\etree.py
d
build\temp.win32-2.4\Release\src\lxml\etree.o:etree.c:(.text+0x38b3): undefined
reference to `_imp__xmlFree'
build\temp.win32-2.4\Release\src\lxml\etree.o:etree.c:(.text+0x193b0): undefined
 reference to `_imp__xmlFree'
build\temp.win32-2.4\Release\src\lxml\etree.o:etree.c:(.text+0x202d6): undefined
 reference to `_imp__xmlFree'
build\temp.win32-2.4\Release\src\lxml\etree.o:etree.c:(.text+0x2044a): undefined
 reference to `_imp__xmlFree'
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1

I already altered the setup.py to include

include_dir=['c:\libxml\include']
library_dirs=['c:\libxml\lib']
libaries=['libxml','libxslt','iconv','zlib']

libxml2 is from the prebuilt-windows-binaries.

Now the question is: Are those prebuilt-binaries incorrectly built and
thus don't include the necessary symbols or is lxml at fault here? Would
maybe building libxml2 myself solve this?

Andreas

-- 
Today is what happened to yesterday.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://codespeak.net/pipermail/lxml-dev/attachments/20060214/92e72069/attachment.pgp


More information about the lxml-dev mailing list