cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
kiranpanch
Observer
Observer
271 Views
Registered: ‎11-08-2017

unable to include "libxml/xmlmemory.h" in petalinux-build

I am unable to include libxml2 in my app.

I have choosen libxml2 in rootfs config, and build was successfu. Also generated SDK and did "petalinux-package --sysroot".

But when I include "libxml/xmlmemory.h" in my source file, I get no such file/directory error and build fails.

I have also tried adding the sdk/sysroots in "-I" option in Makefile, no luck. Can anybody please help?

[Petalinux 2019.2 for ZCU102]

 

Makefile:

APP = test
LDLIBS += -lpthread
LDLIBS += -lxml2
# Add any other object files to this list below
INC_DIR = <absolute path>/images/linux/sdk/sysroots/aarch64-xilinx-linux/usr/include/libxml2/


APP_OBJS = test.o

all: build

build: $(APP)

$(APP): $(APP_OBJS)
$(CC) -I$(INC_DIR) -o $@ $(APP_OBJS) $(LDFLAGS) $(LDLIBS)
clean:
rm -f $(APP) *.o
 
 
0 Kudos
0 Replies