[xmlsec] Compilation of XmlSec Application on Windows

Roumen Petrov xmlsec at roumenpetrov.info
Mon May 24 13:38:06 PDT 2010

Aleksey Sanin wrote:
> You obviously have a problem with compiling the library. You need
> to make sure you use the same compiler/linker and same target for
> all your libraries.
> Aleksey

Yes and no.

Probably issue it related to different msvc runtimes as is reported 
crash in xmlOutputBufferClose.

This is well documented in MSDN - file and memory operations must use 
API from same shared library(DLL). As example lets DLL is linked to msvc 
runtime version A and application is linked to version B. In this case 
application cannot perform IO operation on file stream(FILE*) returned 
by DLL and vice versa - DLL cannot perform IO operation on file stream 
opened by application.

> On 5/22/2010 9:55 PM, rahul kumar wrote:
>> Hi Aleksey,
>> After my analysis I found that the application crashes in function
>> xmlSecTransformC14NPushXml ( In file c14n.c) where it calls the
>> function
>> xmlOutputBufferClose(buf), if I comment this function then the
>> operation
>> fails but the application doesnt crash.

May if you application use libxml IO callbacks you issue will be 
resolved on windows where OS lack standard C runtime.


More information about the xmlsec mailing list