GNOME Bugzilla – Bug 590302
exports don't work with mingw gcc 4.4.0
Last modified: 2009-08-10 08:12:38 UTC
Hello! libxml2 builds fine for me on mingw/MSYS with gcc 3.4.5, but with gcc 4.4.0 I get the following: libtool: link: gcc -g -O2 -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -o .libs/xmllint.exe xmllint.o -Lc:/build/lib ./.libs/libxml2.a -lz -liconv -lws2_32 xmllint.o: In function 'processNode': c:\build\src\libxml2/xmllint.c:1800: undefined reference to '__imp__xmlFree' xmllint.o: In function 'streamFile': c:\build\src\libxml2/xmllint.c:1832: undefined reference to '__imp__xmlGenericErrorContext' c:\build\src\libxml2/xmllint.c:1832: undefined reference to '__imp__xmlGenericError' ... and you get the picture. I found a discussion here: http://mail.gnome.org/archives/xml/2004-February/msg00004.html Both suggestions fix the error. I made a patch for the second one.
Created attachment 139583 [details] [review] patch for gcc 4.4.0 exports problem
This patch definitely need to be sent to the list for review as I'm unable to assert its value, I don't have any Windows licence. http://mail.gnome.org/mailman/listinfo/xml Daniel
Okay rereading various threads about this on the list and on the net, I'm tempted to actually apply only the minimalist change where if defined(IN_LIBXML) is removed from the test. Based on your comment and Igor's one this sounds like a working solution. I commited this instead. thanks ! Daniel