tags:

views:

17

answers:

1

I don't want to look stupid, but how should I link 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?

A: 

CXXFLAGS are for the compiler, LDFLAGS for the linker.

So add

xml2-config --libs

to your LDFLAGS

and

xml2-config --cflags

to your CXXFLAGS

ninjalj