Hi All,
I am using libxml2 in my application and having been linking it dynamically. It works fine until I started noticing the dynamic lib was updated on 10.9 OSX and when the application runs on 10.8 and 10.7 I see issues due to lower version of libxml2.
The Problem see is
Warning: program compiled against libxml 209 using older 207
I seem to get parse errors with this however the same code works fine in 10.9 with version 209
To avoid this problem, I wanted to statically compile my code to use libxml2.a. I ran into multiple issues with this. I could not compile due to missing symbols in libxml2.a version installed in my machine.
I download the latest code from git repo and compiled it. I did not install it but made my program point to the new static library. Still I have the same issue.
Compile Flags
-mmacosx-version-min=10.7 /devel/libxml2.a
Undefined symbols for architecture x86_64: "_libiconv", referenced from: _xmlIconvWrapper in libxml2.a(encoding.o) "_libiconv_close", referenced from: _xmlFindCharEncodingHandler in libxml2.a(encoding.o) _xmlCharEncCloseFunc in libxml2.a(encoding.o) "_libiconv_open", referenced from: _xmlFindCharEncodingHandler in libxml2.a(encoding.o) ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation) Is there a fix for this? I am quite confused as to how to resolve this problem. I would hate to change the parser library just for this. This mean I need to rewire a lot of code. Please help.
Regards, Varun |