I want to include "libxml" library in my code. But I have no idea, How to include this library in my own code. I am using Turbo C++ IDE.

Thanks

有帮助吗?

解决方案

Your library will have some header files. Suppose that you decide you need header files called "libxml_a.h", "libxml_b.h", and "libxml_c.h" for a file that references these libraries. Then you add the following lines to your code,

#include "libxml_a.h"
#include "libxml_b.h"
#include "libxml_c.h"

//depending how you feel about using namespace
using namespace libxml; // or whatever their namespace is called

... //your code goes here

Your library will also have some object files (.obj, .o, .so, .a), and you will want to place them into a location where your linker can find them. and tell your linker where to find these additional dependency files. So you need to edit your project file and add this library path to your linker,

library_path = ...<whatever lib path was>... <path to libxml>
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top