最近在学习iDT算法,刚刚接触Ubuntu也刚刚接触c++,很多东西不是很懂,请教各位:
我在编译iDT算法的时候,需要依赖opencv和ffmpeg两个库,我安装成功并且确保这两个库能用之后,去编译iDT算法,'make'之后报错:
查过资料,有的人说是缺少main函数,但是我确保.cpp文件里是有main函数的。
也有帖子说是crt1.o文件的问题,也有帖子说是动态库的问题,现在很迷茫,不知道问题出在哪里,希望各位能够帮助我,万分感谢。
同时为了方便各位帮我找到问题,我上一下我的makefile文件以及Opencv和ffmpeg的安装信息。
Makefile文件
# set the binaries that have to be built
TARGETS := DenseTrack Video
# set the build configuration set
BUILD := release
#BUILD := debug
# set bin and build dirs
BUILDDIR := .build_$(BUILD)
BINDIR := $(BUILD)
# libraries
LDLIBS = $(addprefix -l, $(LIBS) $(LIBS_$(notdir $*)))
LIBS := \
opencv_core opencv_highgui opencv_video opencv_imgproc \
avformat avdevice avutil avcodec swscale
# set some flags and compiler/linker specific commands
CXXFLAGS = -pipe -D __STDC_CONSTANT_MACROS -D STD=std -Wall $(CXXFLAGS_$(BUILD)) -I. -I/opt/include
CXXFLAGS_debug := -ggdb
CXXFLAGS_release := -O3 -DNDEBUG -ggdb
LDFLAGS = -L/opt/lib -pipe -Wall $(LDFLAGS_$(BUILD))
LDFLAGS_debug := -ggdb
LDFLAGS_release := -O3 -ggdb
include make/generic.mk
下面是opencv和ffmpeg的安装信息:
ffmpeg:
opencv:
恳请各位帮忙!!(小弟没有金币,没办法给悬赏,还请各位见谅!)