开发者

how to configure dynamic linking of libxml2?

开发者 https://www.devze.com 2023-01-04 23:17 出处:网络
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

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

0

精彩评论

暂无评论...
验证码 换一张
取 消