RE: Building XML::LibXML on Windows
"Steve Hay" <[email protected]> Mon, 6 Jun 2011 18:13:48 +0100
| Newsgroups | gmane.comp.lang.perl.xml |
|---|---|
| Message-ID | <[email protected]> |
Michael Ludwig wrote on 2011-06-06: > I need XML::LibXML on Windows (Win7, but the particular version > shouldn't matter). I can't use what I'd like to, i.e. ActiveState or > Strawberry. I have to compile with an in-house built of Perl 5.10.0. > I'm attaching the "perl -V" at the end of this message. > > The Perl has been built with Visual Studio 9.0. I have VS 10.0 (2010 > Express): > > C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.EXE > > I've sourced the environment script for VS: > > "%VS100COMNTOOLS%\vsvars32.bat" > > The latest version of libxml2 is here: > > C:\OPT\LIBXML2 > ├───bin - .exe and .dll > ├───include - headers > │ ├───libxml > │ └───openssl > └───lib - .lib files (import libraries for DLLs) > > C:\Opt\libxml2\bin is in the PATH. > > So I downloaded the current tarball and ran "perl Makefile.PL": > > C:\Opt\Src\XML-LibXML-1.70 :: perl Makefile.PL > enable native perl UTF8 > looking for -lxml2... no > looking for -llibxml2... no > libxml2 not found > Try setting LIBS and INC values on the command line > > I tried various ways of specifying LIBS and INC on the command line. > Part of the problem is that I'm not sure *what* to specify in LIBS and > INC. > > perl Makefile.PL ^ LIBS="-LC:\Opt\libxml2\bin -llibxml2 -lzlib -lzlib" ^ > INCLUDE=-IC:\Opt\libxml2\include > > Same outcome as without explicit LIBS and INCLUDE. > > Adding DEBUG=1 to the Makefile.PL arguments elicits a lengthy output, > which I'm going to append. > > Does anyone have a clue on how to proceed here? > I do it by adding libxml2's INCLUDE and LIB folders to the %INCLUDE% and %LIB% environment variables in the command prompt, after setting up the vsvars32 environment: set INCLUDE=%INCLUDE%;C:\Opt\libxml2\include set LIB=%LIB%;C:\Opt\libxml2\lib _______________________________________________ Perl-XML mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs