Problems with using libxml2

There is nothing in “requires” library section, I follow your code.
Are you sure your toolchain really containing these .h files?

#include <libxml/parser.h>
#include <libxml/tree.h>

BTW, I used Developer studio to compile:

23:34:47 **** Incremental Build of configuration Target_Legato_Debug for project xmlTest ****
make -C Target_Legato_Debug all 
make: Entering directory `/home/owner/legato/workspace/xmlTest/Target_Legato_Debug'
cd ..;mkapp -t wp76xx -o Target_Legato_Debug -w Target_Legato_Debug -i "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/interfaces/atServices" -i "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/interfaces/airVantage/legacy" -i "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/interfaces/watchdog" -i "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/interfaces/portService" -i "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/interfaces/supervisor" -i "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/interfaces/logDaemon" -i "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/interfaces/positioning" -i "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/interfaces/secureStorage" -i "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/interfaces" -i "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/interfaces/wifi" -i "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/interfaces/modemServices" -i "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/interfaces/airVantage" -i /opt/swi/SWI9X07Y_02.28.03.05/sysroots/armv7a-neon-poky-linux-gnueabi/usr/include/ -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/dataConnectionService/platformAdaptor/default" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/test/watchdogChain" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/apps/platformServices/airVantageConnector" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/airVantage" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/modules/WiFi/apps/tools/wifi" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/positioning" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/secStore" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/uartMode/platformAdaptor/default" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/portService" -s "." -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/modemServices/platformAdaptor/default" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/audio/platformAdaptor/default" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/apps/tools" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/3rdParty" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/fwupdate/platformAdaptor/default" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/dataConnectionService" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/modules/WiFi/service" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/airVantage/platformAdaptor/default" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/fwupdate" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/positioning/platformAdaptor/default" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/devMode" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/secStore/platformAdaptor/default" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/apps/platformServices/mqttClient" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/atServices" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/modemServices" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components" -s "/home/owner/legato/packages/legato.framework.19.2.0.wp76xx-201906171244/resources/legato/components/uartMode" -C -g -X -g -L -g xmlTest.adef
[1/1] Regenerating build script
[1/9] Compiling C source
[2/9] Compiling C source
[3/9] Compiling C source
[4/9] Linking C library
[5/9] Bundling file
[6/9] Linking C executable
[7/9] Bundling file
[8/9] Creating info.properties
[9/9] Packaging app
make: Leaving directory `/home/owner/legato/workspace/xmlTest/Target_Legato_Debug'

23:34:48 Build Finished (took 584ms)