1、错误打印
在编译海思hi3559av100时候报错如下:
V100R001C01SPC001/app/../platform/hi3559a/lib/libmpi.a(mpi_vb.o): In function `HI_MPI_VB_CreatePool':
mpi_vb.c:(.text.HI_MPI_VB_CreatePool+0xb8): undefined reference to `strncpy_s'
V100R001C01SPC001/app/../platform/hi3559a/lib/libmpi.a(mpi_vb.o): In function `HI_MPI_VB_GetBlock':
mpi_vb.c:(.text.HI_MPI_VB_GetBlock+0x118): undefined reference to `strncpy_s'
V100R001C01SPC001/app/../platform/hi3559a/lib/libmpi.a(mpi_sys.o): In function `HI_MPI_SYS_MmzAlloc':
mpi_sys.c:(.text.HI_MPI_SYS_MmzAlloc+0xd8): undefined reference to `strncpy_s'
mpi_sys.c:(.text.HI_MPI_SYS_MmzAlloc+0xf0): undefined reference to `strncpy_s'
V100R001C01SPC001/app/../platform/hi3559a/lib/libmpi.a(mpi_sys.o): In function `HI_MPI_SYS_MmzAlloc_Cached':
mpi_sys.c:(.text.HI_MPI_SYS_MmzAlloc_Cached+0xd8): undefined reference to `strncpy_s'
V100R001C01SPC001/app/../platform/hi3559a/lib/libmpi.a(mpi_sys.o):mpi_sys.c:(.text.HI_MPI_SYS_MmzAlloc_Cached+0xf0): more undefined references to `strncpy_s' follow
V100R001C01SPC001/app/../platform/hi3559a/lib/libmpi.a(mpi_adec.o): In function `MPI_ADEC_SendStream':
mpi_adec.c:(.text.MPI_ADEC_SendStream+0x600): undefined reference to `memmove_s'
V100R001C01SPC001/app/../platform/hi3559a/lib/libupvqe.a(hi_upvqe_wrap.o): In function `UPVQE_OutCacheRead':
(.text.UPVQE_OutCacheRead+0x158): undefined reference to `memmove_s'
V100R001C01SPC001/app/../platform/hi3559a/lib/libupvqe.a(hi_upvqe_wrap.o): In function `UPVQE_CacheProcessFrame':
(.text.UPVQE_CacheProcessFrame+0x240): undefined reference to `memmove_s'
(.text.UPVQE_CacheProcessFrame+0x28c): undefined reference to `memmove_s'
V100R001C01SPC001/app/../platform/hi3559a/lib/libdnvqe.a(hi_dnvqe_wrap.o): In function `DNVQE_CacheRead':
(.text.DNVQE_CacheRead+0x158): undefined reference to `memmove_s'
2.解决方案
原先makefile如下:
把libmpi库提到最前面,编译即可通过。可能其他库有使用libmpi.a吧