how to configure dynamic linking of libxml2?
I don't want to look stupid, but how should I lin开发者_StackOverflowk libxml2 to my g++ project (Linux environment)? What should I add to my code besides #include <libxml/tree.h>
? Thanks for a link or a quick hint!
ps. I added this to my CXXFLAGS
: xml2-config —cflags --libs
. Enough?
CXXFLAGS are for the compiler, LDFLAGS for the linker.
So add
xml2-config --libs
to your LDFLAGS
and
xml2-config --cflags
to your CXXFLAGS
精彩评论