Re: [xml] [Fwd: Unable to compile for 64-bit Window 7 machine.]



Here is what I do to build libxml2-2.7.8: (I use Visual Studio 2008 SP1, and I build zlib before building 
libxml2.)

cd <PATH_TO_ EXTRACTED_libxml2-2.7.8>
set CUR_DIR=%cd%
set PLAT=win64
call "%VS90COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64
set XML_DIR=%CUR_DIR%\..\install\%PLAT%
set PATH=%XML_DIR%\bin;%PATH%
set INC_DIR=%XML_DIR%\include
set LIB_DIR=%XML_DIR%\lib
set BIN_DIR=%XML_DIR%\bin
set DBG=no

cd CUR_DIR\win32
cscript configure.js compiler=msvc prefix=%XML_DIR% incdir=%INC_DIR% include=%INC_DIR%\zlib libdir=%LIB_DIR% 
sodir=%LIB_DIR% lib=%LIB_DIR% bindir=%BIN_DIR% zlib=yes iconv=no debug=%DBG% vcmanifest=yes

nmake -f Makefile.msvc

In addition, I changed Makefile.msvc to remove some warnings, make it work with the zlib I wanted,  create 
release .pdb files, and to work better building debug code. (And maybe some other reasons I forgot.)


23a24,33
XML_DEF = $(XML_BASENAME).def

!if "$(DEBUG)" == "1"
XML_SO = $(XML_BASENAME)d.dll
XML_IMP = $(XML_BASENAME)d.lib
XML_A = $(XML_BASENAME)_ad.lib
XML_A_PDB = $(XML_BASENAME)_ad.pdb
XML_A_DLL = $(XML_BASENAME)_a_dlld.lib
XML_A_DLL_PDB = $(XML_BASENAME)_a_dlld.pdb
!else
26d35
< XML_DEF = $(XML_BASENAME).def
27a37
XML_A_PDB = $(XML_BASENAME)_a.pdb
28a39,40
XML_A_DLL_PDB = $(XML_BASENAME)_a_dll.pdb
!endif
74,76c86,88
< +!if "$(WITH_ICU)" == "1"
< +LIBS = $(LIBS) icu.lib
< +!endif
---
!if "$(WITH_ICU)" == "1"
LIBS = $(LIBS) icu.lib
!endif
78c90,94
< LIBS = $(LIBS) zdll.lib
---
!if "$(DEBUG)" == "1"
LIBS = $(LIBS) zlibd.lib
!else
LIBS = $(LIBS) zlib.lib
!endif
93,94c109,110
< CFLAGS = $(CFLAGS) /D "_DEBUG" /Od /Z7
< LDFLAGS = $(LDFLAGS) /DEBUG
---
CFLAGS = $(CFLAGS) /D "_DEBUG" /Od /Zi
LDFLAGS = $(LDFLAGS) /DEBUG /DEFAULTLIB:msvcrtd /NODEFAULTLIB:msvcrt
96,97c112,113
< CFLAGS = $(CFLAGS) /D "NDEBUG" /O2 
< LDFLAGS = $(LDFLAGS) /OPT:NOWIN98
---
CFLAGS = $(CFLAGS) /D "NDEBUG" /O2 /Zi
LDFLAGS = $(LDFLAGS) /OPT:NOWIN98 /DEBUG
300a317,318
      copy $(XML_INTDIR_A)\$(XML_A_PDB) $(LIBPREFIX)
      copy $(XML_INTDIR_A_DLL)\$(XML_A_DLL_PDB) $(LIBPREFIX)
306c324
< install-dist : install-libs 
---
install-dist : install-libs
342c360
<       $(CC) $(CFLAGS) /D "LIBXML_STATIC" /Fo$(XML_INTDIR_A)\ /c $<
---
      $(CC) $(CFLAGS) /D "LIBXML_STATIC" /Fo$(XML_INTDIR_A)\ /Fd$(XML_INTDIR_A)\$(XML_A_PDB) /c $<
346c364
<       $(CC) $(CFLAGS) /D "LIBXML_STATIC" /D "LIBXML_STATIC_FOR_DLL" /Fo$(XML_INTDIR_A_DLL)\ /c $<
---
      $(CC) $(CFLAGS) /D "LIBXML_STATIC" /D "LIBXML_STATIC_FOR_DLL" /Fo$(XML_INTDIR_A_DLL)\ 
/Fd$(XML_INTDIR_A_DLL)\$(XML_A_DLL_PDB) /c $<


Thomas Floodeen, Jr.
Mentor Graphics BSD
720.494.1133


-----Original Message-----
From: xml-bounces gnome org [mailto:xml-bounces gnome org] On Behalf Of Michael Eubanks
Sent: Tuesday, September 27, 2011 9:41 PM
To: xml gnome org
Subject: [xml] [Fwd: Unable to compile for 64-bit Window 7 machine.]

-------- Forwarded Message --------
From: Michael Eubanks <mse_software charter net>
To: xml gnome org
Subject: [xml] Unable to compile for 64-bit Window 7 machine.
Date: Tue, 27 Sep 2011 19:15:57 -0700

Hello,

I am trying to compile on a 64-bit Windows 7 machine using either 
nmake from the Windows Command Prompt or GCC in a MinGW shell.  
Neither method works due to the combination of both forward and back 
slashes in the make file.  I'm wondering if anyone has any tips on how 
the compilation is supposed to work.  Currently, my process looks like 
the following in the Windows Command Prompt:

 * cd\win32
 * cscript configure.js
 * nmake /f Makefile.msvc

The error during make states that the header file cannot be found but 
the path to the header file is specified using both forward and back 
slashes.  If I specify the path with all backslashes, the compilation 
works.


Thank you,
-Michael Eubanks



On second thought, it took much more than changing the paths.  Is 64-bit support for Windows non-existent?



_______________________________________________
xml mailing list, project page  http://xmlsoft.org/ xml gnome org http://mail.gnome.org/mailman/listinfo/xml



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]