Cross compile xml parser for mt76x8

Hi . I want to cross compile a code to parsing xml document with libxml2. I use eclipse and i can cross compile codes that doesn't need external libraries . but when I want to compile a code that need libraries such as libxml2 , I don`t know , how should config the eclipse , where should I put the libraries , ... .