[英]how to configure dynamic linking of libxml2?
I don't want to look stupid, but how should I link libxml2 to my g++ project (Linux environment)? 我不想显得愚蠢,但是应该如何将libxml2链接到我的g ++项目(Linux环境)? What should I add to my code besides
#include <libxml/tree.h>
? 除了
#include <libxml/tree.h>
,我还应该在代码中添加#include <libxml/tree.h>
什么? Thanks for a link or a quick hint! 感谢您的链接或快速提示!
ps. ps。 I added this to my
CXXFLAGS
: xml2-config —cflags --libs
. 我将其添加到
CXXFLAGS
: xml2-config —cflags --libs
。 Enough? 足够?
CXXFLAGS are for the compiler, LDFLAGS for the linker. CXXFLAGS用于编译器,LDFLAGS用于链接器。
So add 所以加
xml2-config --libs
to your LDFLAGS 给你的LDFLAGS
and 和
xml2-config --cflags
to your CXXFLAGS 到您的CXXFLAGS
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.