Home > OS >  Ubuntu compile engineering error "XML. H: 22: fatal error: libxml/parser. H: No to the file or
Ubuntu compile engineering error "XML. H: 22: fatal error: libxml/parser. H: No to the file or

Time:09-25

The project has on the environment:
(1) ubuntu12.04
(2) the compiler: GCC version 20160904 5.4.1 (Ubuntu ubuntu1 5.4.1-2-12.04)
(3) a cross-compiler: GCC version 4.4.1 (Sourcery g + + Lite q3 2009-67)
(4) system for x86_64
(5) zlog - 1.2.14. Tar. Gz
The makefile file contents:
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * a makefile start * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
CROSS_COMPILE=arm - none - Linux - gnueabi -
# CROSS_COMPILE=

The TAR=CTL. Bin
OBJS=main. O sys. 1 o o dm. O \
Ver. O var. O const_data. O gpio. O \
Public_config. O \
XML. O private_config. O STR. O file_info. O pipe. O pipe_cmd. O \
Process_mutex. O zlog_interface. O \
Event_core. O dm_epoll. O timer. O \
Socket. O sp_frame_analyse. O commun. O \
Cmd_core. O \
Dm_flow. O \
Monitor. O \
Dev_state. O \
Online. O \
Serial_port. O \
Info_census. O tick. O ab_process. O \
Abnormal. O abnormal_act. O abnormal_simulate. O ab_interface. O \
Conf_coprocess_module. O
CC=$(CROSS_COMPILE GCC)
CFLAGS=- g - O2 - Wstrict - as - Wno - unused - function - STD=gnu99 # - I/usr/include/libxml2 - I/usr/include/

LDFLAGS=- pthread - lxml2 LRT - lzlog

$(TAR) : $(OBJS)
$(CC) $$(CFLAGS) - o (TAR) $(OBJS) $(LDFLAGS)
Rm - rf *. O
Clean:
Rm - rf *. O $(TAR)

Ifneq (" $V ", "1")
Q=@
Endif
%. O: c
%.@ echo "\ [1; 35 m $033 (CC) $@ \ [0 033 m"
$(Q) $(CC) - pipe $(CFLAGS) - c - o $@ $& lt;
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * a makefile end * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Commented out "-i/usr/include/libxml2 - I/usr/include/", an" XML. H: 22: fatal error: libxml/parser. H: No to the file or directory
", under the/usr/include/existing libxml2,
Don't comment out "cc1: warning: include the location"/usr/include/libxml2 "is unsafe for cross - compilation",

CodePudding user response:

The libxml2 cross-compilation?

CodePudding user response:

Cross-compilation already, but no will generate the include no in/usr/include, cross-compilation generated include under built myself a installation folder, is under the project when cross-compiling CFLAGS add -i plus I XML cross-compilation generated include path?

CodePudding user response:

refer to the second floor fightinghui1121 response:
already cross-compilation, but no will generate the include no in/usr/include, cross-compilation generated include in my own built a installation folder, is under the project when cross-compiling CFLAGS add -i plus I XML cross-compilation generated include path?

yes
  • Related