请问编译连接有关问题

请教编译连接问题
最近在做ftp上传功能,ftp服务器已经有了,我现在准备直接调用ftp服务器里面的cmd_put和cmd_lcd 等函数实现上传文件的目的。
ftp服务器的源码目录位于/app/network/quftp/中,我的应用程序位于/app/system/src里面,我在我的应用程序的Makfile中添加了ftp.h的位置,ftp.o的位置,以及ftp.c依赖的函数的。o文件的位置。编译依旧报错。现在附上我应用程序的makfile和编译报错信息,求大神指点!


# Makefile
#
ROOTDIR = ../../..
QUFTPDIR = ../../network/quftp-1.0.7

include $(ROOTDIR)/Rules.make

QUFTP += $(QUFTPDIR)/*.o


TARGET = system_server

C_FLAGS += -Wall -g -O3

CPP_FLAGS += -I$(PUBLIC_INCLUDE_DIR) \
-I../inc \
-I/DM368/HD_DVR/mgui/include \
-I$(QUFTPDIR) \
-D_GNU_SOURCE \
-D_LARGEFILE64_SOURCE \
-D_FILE_OFFSET_BITS=64 \
                $(XDC_FLAGS)

LD_FLAGS += -L/DM368/HD_DVR/mgui/lib -lfreetype -lpthread -lminigui_ths -ldl -lpng -ljpeg
#-lmgi

COMPILE.c = $(MVTOOL_PREFIX)gcc $(C_FLAGS) $(CPP_FLAGS) -c
LINK.c = $(MVTOOL_PREFIX)gcc $(LD_FLAGS)

RELTARGET = release/$(TARGET)

RELCFLAGS = -fno-strict-aliasing

SOURCES = $(wildcard *.c)
HEADERS = $(wildcard *.h) $(PUBLIC_INCLUDE_DIR)/*.h

RELOBJFILES = $(SOURCES:%.c=release/%.o)

RELLDFLAGS =


.PHONY: clean release install

all:    release

install: release
install -d $(EXEC_DIR)
install $(RELTARGET) $(EXEC_DIR)
ln -sf /tmp/localtime $(TARGET_FS)/usr/share/zoneinfo/localtime
ln -sf /tmp/localtime $(TARGET_FS)/usr/share/zoneinfo/posixrules
ln -sf /tmp/localtime $(TARGET_FS)/etc/localtime

release:    $(RELTARGET)

$(RELTARGET):   $(RELOBJFILES) $(QUFTP) $(APP_LIB_DIR)/file_msg_drv.a $(APP_LIB_DIR)/Appro_interface.a $(APP_LIB_DIR)/alarm_msg_drv.a $(APP_LIB_DIR)/dm355_gio_util.a  $(CMEM_INSTALL_DIR)/packages/ti/sdo/linuxutils/cmem/lib/cmem.a470MV
$(LINK.c) -o $@ $^ $(RELLDFLAGS)


$(RELOBJFILES): release/%.o: %.c $(HEADERS)
@mkdir -p release
$(COMPILE.c) $(RELCFLAGS) -o $@ $<

clean:
-$(RM) -rf release  *.d




编译报的错误


引用
/opt/mv_pro_5.0/montavista/pro/devkit/arm/v5t_le/bin/arm_v5t_le-gcc -L/DM368/HD_DVR/mgui/lib -lfreetype -lpthread -lminigui_ths -ldl -lpng -ljpeg -o release/system_server release/alarm_main.o release/alarm_schedule.o release/avi_mng.o release/av_server_ctrl.o release/checkPlatform.o release/crc32.o release/device_config.o release/file_dispatcher.o release/file_mng.o release/file_mng_main.o release/framerate_tables.o release/gui.o release/ImeGui.o release/jpg_mng.o release/main.o release/menu.o release/misc_mng.o release/net_config.o release/proc_alarm.o release/rtsp_ctrl.o release/schedule_mng.o release/sd_config.o release/semaphore_util.o release/system_control.o release/update.o ../../network/quftp-1.0.7/ftp_data.o ../../network/quftp-1.0.7/ftp_directory.o ../../network/quftp-1.0.7/ftp_list.o ../../network/quftp-1.0.7/ftp_login.o ../../network/quftp-1.0.7/ftp.o ../../network/quftp-1.0.7/ftp_transfer.o ../../network/quftp-1.0.7/log.o ../../network/quftp-1.0.7/quftp.o ../../network/quftp-1.0.7/rc.o ../../network/quftp-1.0.7/text.o /DM368/HD_DVR/ipnc/ipnc_app/interface/lib/file_msg_drv.a /DM368/HD_DVR/ipnc/ipnc_app/interface/lib/Appro_interface.a /DM368/HD_DVR/ipnc/ipnc_app/interface/lib/alarm_msg_drv.a /DM368/HD_DVR/ipnc/ipnc_app/interface/lib/dm355_gio_util.a /DM368/HD_DVR/dvsdk_2_10_01_18/linuxutils_2_24_03/packages/ti/sdo/linuxutils/cmem/lib/cmem.a470MV 
../../network/quftp-1.0.7/quftp.o: In function `main':
/DM368/HD_DVR/ipnc/ipnc_app/network/quftp-1.0.7/quftp.c:134: multiple definition of `main'
release/main.o:/DM368/HD_DVR/ipnc/ipnc_app/sys_server/src/main.c:4023: first defined here
../../network/quftp-1.0.7/quftp.o: In function `quftp_completion':
quftp.c:(.text+0x14cc): undefined reference to `rl_completion_matches'
quftp.c:(.text+0x14ec): undefined reference to `rl_completion_matches'
../../network/quftp-1.0.7/quftp.o: In function `main':
quftp.c:(.text+0x1bf8): undefined reference to `SysDrvInit'
quftp.c:(.text+0x1c2c): undefined reference to `ControlSystemData'
quftp.c:(.text+0x1c60): undefined reference to `ControlSystemData'
quftp.c:(.text+0x1c94): undefined reference to `ControlSystemData'
quftp.c:(.text+0x1cc8): undefined reference to `ControlSystemData'
quftp.c:(.text+0x1cfc): undefined reference to `ControlSystemData'
../../network/quftp-1.0.7/quftp.o:quftp.c:(.text+0x1d30): more undefined references to `ControlSystemData' follow
../../network/quftp-1.0.7/quftp.o: In function `main':
quftp.c:(.text+0x2244): undefined reference to `add_history'
quftp.c:(.text+0x227c): undefined reference to `readline'