Question

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

Was it helpful?

Solution

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>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top