Re: [xml] MSYS and MINGW: undefined reference to _imp__xmlFree

On 11/8/2009 at 8:08 PM, Roumen Petrov <bugtrack roumenpetrov info> wrote:
Roumen Petrov wrote:
Martin Schlemmer wrote:

It seems to me Martin is right but proposed patch is not correct to me. 
I think that code has to set LIBXML_STATIC internally when is compiled 
for static library. As libxml build is libtool based we may use PIC 
definition. libtool when compile source for shared always set -DPIC .

Idea was sort of to remove the need for that.  I will respond to Igor's mail about that.

Now with reverted commit 
, i.e. restored "...defined(IN_LIBXML)..." plus following patch
diff --git a/libxml.h b/libxml.h
index 3c44c83..1656ac2 100644
--- a/libxml.h
+++ b/libxml.h
@@ -90,4 +90,7 @@ void __xmlGlobalInitMutexDestroy(void);
+#ifndef PIC
+#  define LIBXML_STATIC
  #endif /* ! __XML_LIBXML_H__ */

This probably will break MSVC and Borland.  Also non-libtool-enabled builds might also break,
as "-fPIC -DPIC" is added by libtool, but ignored by gcc on win32 as all code on x86-win32 is already
position independent.

Not sure what to suggest with this, but to check that with reverted commit that xmlsec is indeed
built with -DLIBXML_STATIC if linking to the static version of the library.



Vrywaringsklousule / Disclaimer: 

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