Hi Roumen,

My win build system is back home so haven't had a chance to look at it or be 
able to test any of this stuff until next week. Can't really comment until 
then. 

Rob

On May 22, 2012, at 5:43 PM, Roumen Petrov <[email protected]> wrote:

> Hi All,
> 
> I think that I understand MSC build issue.
> 
> 
> Michael Ludwig wrote:
>> Rob Richards schrieb am 21.05.2012 um 05:48 (-0400):
>>> The mingw change for Bug 676427 ends up breaking for windows VS builds
>>> as the change affects them and not just mingw. Basically by remove the
>>> definitions, I end up with a bunch of unresolved external symbol
>>> errors.
> 
> The configure.js create  config.h from win32config.h but win32/Makefile* 
> files does not define HAVE_CONFIG_H in CFLAGS. I don't know why.
> 
> All source files except :
> - runsuite.c
> - runtest.c
> - runxmlconf.c
> - testapi.c
> - testrecurse.c
> include libxml.h unconditionally .
> 
> Above listed five (5) files use:
> -----
> #ifdef HAVE_CONFIG_H
> #include "libxml.h"
> #else
> #include <stdio.h>
> #endif
> -----
> 
> So proposed fix is to replace just with
> -----
> #include "libxml.h"
> #include <stdio.h>
> -----
> Note without to use #define IN_LIBXML before #include libxml.h
> 
>> FWIW, the link error I'm seeing is:
>> 
>> link.exe /nologo /VERSION:2.8 /LIBPATH:bin.msvc 
>> /LIBPATH:C:\Opt\CLib\LibXML\lib /OUT:bin.msvc\runtest.exe libxml2.lib  
>> wsock32.lib ws2_32.lib iconv.lib kernel32.lib int.utils.msvc\runtest.obj
>> runtest.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol 
>> "_snprintf" in Funktion "_resultFilename".
>> 
>> Michael
> 
> Second solutions it to restore redefinition {v}snprintf  to  _{v}snprintf but 
> with different rule . For instance following code:
> -----
> #if defined(_WIN32) && !defined(__CYGWIN__)
> #define snprintf _snprintf
> .....
> #endif
> -----
> to be replaced by
> ++++
> #if defined(_MSC_VER)
> #define snprintf _snprintf
> .....
> #endif
> ++++
> 
> 
> 
> Third solution is to update win32/Makefile* to define HAVE_CONFIG_H in CFLAGS.
> Note that win32/VC10/runsuite.vcxproj list HAVE_CONFIG_H in 
> <PreprocessorDefinitions> tag.
> 
> 
> So what you think ?
> 
> Roumen
> 
> P.S. I forgot to update testapi.c so I will provide  additional patch 
> depending from feedback to address in addition testapi.c.
> 
> _______________________________________________
> xml mailing list, project page  http://xmlsoft.org/
> [email protected]
> http://mail.gnome.org/mailman/listinfo/xml

Attachment: smime.p7s
Description: S/MIME cryptographic signature

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

Reply via email to