当前位置: 技术问答>linux和unix
help!!!]静态编译opencv程序“人脸检测系统”出错
来源: 互联网 发布时间:2016-06-28
本文导语: 我的Makefile如下: INCLUDEPATH=/usr/local/include/opencv LIBS+=/usr/local/lib/libhighgui.a /usr/local/lib/libcv.a /usr/local/lib/libcxcore.a /usr/local/lib/libcvaux.a /usr/local/lib/libml.a /usr/local/lib/libgtk-x11-2.0.a /usr/local/lib/libgdk-x11-2.0.a /usr/local/li...
我的Makefile如下:
INCLUDEPATH=/usr/local/include/opencv
LIBS+=/usr/local/lib/libhighgui.a /usr/local/lib/libcv.a /usr/local/lib/libcxcore.a
/usr/local/lib/libcvaux.a /usr/local/lib/libml.a
/usr/local/lib/libgtk-x11-2.0.a /usr/local/lib/libgdk-x11-2.0.a
/usr/local/lib/libgobject-2.0.a /usr/local/lib/libglib-2.0.a
/usr/local/lib/libgthread-2.0.a
/usr/local/lib/libpng.a /usr/local/lib/libjpeg.a /usr/local/lib/libtiff.a
/usr/lib/libpthread.a
facedect: facedect.cpp facedect.h
g++ -I$(INCLUDEPATH) facedect.cpp facedect.h -o facedect $(LIBS)
结果出一堆错误:
/usr/local/lib/libhighgui.a(grfmt_jpeg2000.o): In function `GrFmtJpeg2000Writer::WriteComponent16u(jas_image_t*, unsigned short const*, int, int, int, int)':
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:481: undefined reference to `jas_matrix_create'
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:491: undefined reference to `jas_image_writecmpt'
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:495: undefined reference to `jas_matrix_destroy'
/usr/local/lib/libhighgui.a(grfmt_jpeg2000.o): In function `GrFmtJpeg2000Writer::WriteComponent8u(jas_image_t*, unsigned char const*, int, int, int, int)':
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:458: undefined reference to `jas_matrix_create'
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:468: undefined reference to `jas_image_writecmpt'
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:472: undefined reference to `jas_matrix_destroy'
/usr/local/lib/libhighgui.a(grfmt_jpeg2000.o): In function `GrFmtJpeg2000Writer::WriteImage(unsigned char const*, int, int, int, int, int)':
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:420: undefined reference to `jas_image_create'
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:449: undefined reference to `jas_image_destroy'
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:440: undefined reference to `jas_stream_fopen'
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:443: undefined reference to `jas_image_strtofmt'
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:443: undefined reference to `jas_image_encode'
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:445: undefined reference to `jas_stream_close'
/usr/local/lib/libhighgui.a(grfmt_jpeg2000.o): In function `GrFmtJpeg2000Reader::ReadHeader()':
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:113: undefined reference to `jas_stream_fopen'
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:116: undefined reference to `jas_image_decode'
/usr/local/lib/libhighgui.a(grfmt_jpeg2000.o): In function `GrFmtJpeg2000Reader::Close()':
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:94: undefined reference to `jas_stream_close'
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:100: undefined reference to `jas_image_destroy'
/usr/local/lib/libhighgui.a(grfmt_jpeg2000.o): In function `GrFmtJpeg2000Reader::ReadData(unsigned char*, int, int)':
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:202: undefined reference to `jas_image_getcmptbytype'
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:203: undefined reference to `jas_image_getcmptbytype'
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:204: undefined reference to `jas_image_getcmptbytype'
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:188: undefined reference to `jas_cmprof_destroy'
/usr/local/lib/libhighgui.a(grfmt_jpeg2000.o): In function `GrFmtJpeg2000':
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:54: undefined reference to `jas_init'
/usr/local/lib/libhighgui.a(grfmt_jpeg2000.o): In function `~GrFmtJpeg2000':
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:60: undefined reference to `jas_cleanup'
/usr/local/lib/libhighgui.a(grfmt_jpeg2000.o): In function `GrFmtJpeg2000':
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:54: undefined reference to `jas_init'
/usr/local/lib/libhighgui.a(grfmt_jpeg2000.o): In function `~GrFmtJpeg2000':
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:60: undefined reference to `jas_cleanup'
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:60: undefined reference to `jas_cleanup'
/usr/local/lib/libgtk-x11-2.0.a(gtkbox.o): In function `IA__gtk_box_set_spacing':
/home/hua/gtk+-2.8.20/gtk/gtkbox.c:489: undefined reference to `g_object_notify'
/usr/local/lib/libgtk-x11-2.0.a(gtkbox.o): In function `IA__gtk_box_set_homogeneous':
/home/hua/gtk+-2.8.20/gtk/gtkbox.c:458: undefined reference to `g_object_notify'
/usr/local/lib/libgtk-x11-2.0.a(gtkbox.o): In function `gtk_box_class_init':
/home/hua/gtk+-2.8.20/gtk/gtkbox.c:128: undefined reference to `g_object_class_install_property'
/home/hua/gtk+-2.8.20/gtk/gtkbox.c:138: undefined reference to `g_object_class_install_property'
/usr/local/lib/libgtk-x11-2.0.a(gtkbox.o): In function `gtk_box_get_child_property':
/home/hua/gtk+-2.8.20/gtk/gtkbox.c:357: undefined reference to `g_value_set_int'
/home/hua/gtk+-2.8.20/gtk/gtkbox.c:335: undefined reference to `g_value_set_boolean'
/home/hua/gtk+-2.8.20/gtk/gtkbox.c:344: undefined reference to `g_value_set_enum'
/home/hua/gtk+-2.8.20/gtk/gtkbox.c:341: undefined reference to `g_value_set_uint'
/home/hua/gtk+-2.8.20/gtk/gtkbox.c:338: undefined reference to `g_value_set_boolean'
/usr/local/lib/libgtk-x11-2.0.a(gtkcontainer.o): In function `IA__gtk_container_child_get_valist':
/home/hua/gtk+-2.8.20/gtk/gtkcontainer.c:362: undefined reference to `g_object_ref'
/home/hua/gtk+-2.8.20/gtk/gtkcontainer.c:363: undefined reference to `g_object_ref'
/home/hua/gtk+-2.8.20/gtk/gtkcontainer.c:372: undefined reference to `g_param_spec_pool_lookup'
/home/hua/gtk+-2.8.20/gtk/gtkcontainer.c:392: undefined reference to `g_value_init'
/home/hua/gtk+-2.8.20/gtk/gtkcontainer.c:402: undefined reference to `g_value_unset'
/home/hua/gtk+-2.8.20/gtk/gtkcontainer.c:406: undefined reference to `g_object_unref'
/home/hua/gtk+-2.8.20/gtk/gtkcontainer.c:407: undefined reference to `g_object_unref'
/home/hua/gtk+-2.8.20/gtk/gtkcontainer.c:399: undefined reference to `g_value_unset'
/usr/local/lib/libgtk-x11-2.0.a(gtkcontainer.o): In function `gtk_container_class_init':
/home/hua/gtk+-2.8.20/gtk/gtkcontainer.c:202: undefined reference to `g_object_class_install_property'
/home/hua/gtk+-2.8.20/gtk/gtkcontainer.c:210: undefined reference to `g_object_class_install_property'
/home/hua/gtk+-2.8.20/gtk/gtkcontainer.c:219: undefined reference to `g_object_class_install_property'
/usr/local/lib/libgtk-x11-2.0.a(gtkcontainer.o): In function `gtk_container_real_set_focus_child':
/home/hua/gtk+-2.8.20/gtk/gtkcontainer.c:1469: undefined reference to `g_object_unref'
/home/hua/gtk+-2.8.20/gtk/gtkcontainer.c:1472: undefined reference to `g_object_ref'
/home/hua/gtk+-2.8.20/gtk/gtkcontainer.c:1485: undefined reference to `g_object_get_qdata'
/home/hua/gtk+-2.8.20/gtk/gtkcontainer.c:1486: undefined reference to `g_object_get_qdata'
/usr/local/lib/libgtk-x11-2.0.a(gtkcontainer.o): In function `gtk_container_set_property':
/home/hua/gtk+-2.8.20/gtk/gtkcontainer.c:849: undefined reference to `g_value_get_enum'
/home/hua/gtk+-2.8.20/gtk/gtkcontainer.c:852: undefined reference to
................................大概有5000千多行.............
有人知道这是为什么吗?还缺什么库吗?我的静态库顺序错了吗?
INCLUDEPATH=/usr/local/include/opencv
LIBS+=/usr/local/lib/libhighgui.a /usr/local/lib/libcv.a /usr/local/lib/libcxcore.a
/usr/local/lib/libcvaux.a /usr/local/lib/libml.a
/usr/local/lib/libgtk-x11-2.0.a /usr/local/lib/libgdk-x11-2.0.a
/usr/local/lib/libgobject-2.0.a /usr/local/lib/libglib-2.0.a
/usr/local/lib/libgthread-2.0.a
/usr/local/lib/libpng.a /usr/local/lib/libjpeg.a /usr/local/lib/libtiff.a
/usr/lib/libpthread.a
facedect: facedect.cpp facedect.h
g++ -I$(INCLUDEPATH) facedect.cpp facedect.h -o facedect $(LIBS)
结果出一堆错误:
/usr/local/lib/libhighgui.a(grfmt_jpeg2000.o): In function `GrFmtJpeg2000Writer::WriteComponent16u(jas_image_t*, unsigned short const*, int, int, int, int)':
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:481: undefined reference to `jas_matrix_create'
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:491: undefined reference to `jas_image_writecmpt'
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:495: undefined reference to `jas_matrix_destroy'
/usr/local/lib/libhighgui.a(grfmt_jpeg2000.o): In function `GrFmtJpeg2000Writer::WriteComponent8u(jas_image_t*, unsigned char const*, int, int, int, int)':
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:458: undefined reference to `jas_matrix_create'
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:468: undefined reference to `jas_image_writecmpt'
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:472: undefined reference to `jas_matrix_destroy'
/usr/local/lib/libhighgui.a(grfmt_jpeg2000.o): In function `GrFmtJpeg2000Writer::WriteImage(unsigned char const*, int, int, int, int, int)':
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:420: undefined reference to `jas_image_create'
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:449: undefined reference to `jas_image_destroy'
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:440: undefined reference to `jas_stream_fopen'
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:443: undefined reference to `jas_image_strtofmt'
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:443: undefined reference to `jas_image_encode'
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:445: undefined reference to `jas_stream_close'
/usr/local/lib/libhighgui.a(grfmt_jpeg2000.o): In function `GrFmtJpeg2000Reader::ReadHeader()':
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:113: undefined reference to `jas_stream_fopen'
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:116: undefined reference to `jas_image_decode'
/usr/local/lib/libhighgui.a(grfmt_jpeg2000.o): In function `GrFmtJpeg2000Reader::Close()':
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:94: undefined reference to `jas_stream_close'
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:100: undefined reference to `jas_image_destroy'
/usr/local/lib/libhighgui.a(grfmt_jpeg2000.o): In function `GrFmtJpeg2000Reader::ReadData(unsigned char*, int, int)':
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:202: undefined reference to `jas_image_getcmptbytype'
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:203: undefined reference to `jas_image_getcmptbytype'
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:204: undefined reference to `jas_image_getcmptbytype'
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:188: undefined reference to `jas_cmprof_destroy'
/usr/local/lib/libhighgui.a(grfmt_jpeg2000.o): In function `GrFmtJpeg2000':
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:54: undefined reference to `jas_init'
/usr/local/lib/libhighgui.a(grfmt_jpeg2000.o): In function `~GrFmtJpeg2000':
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:60: undefined reference to `jas_cleanup'
/usr/local/lib/libhighgui.a(grfmt_jpeg2000.o): In function `GrFmtJpeg2000':
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:54: undefined reference to `jas_init'
/usr/local/lib/libhighgui.a(grfmt_jpeg2000.o): In function `~GrFmtJpeg2000':
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:60: undefined reference to `jas_cleanup'
/home/hua/opencv-1.0.0/otherlibs/highgui/grfmt_jpeg2000.cpp:60: undefined reference to `jas_cleanup'
/usr/local/lib/libgtk-x11-2.0.a(gtkbox.o): In function `IA__gtk_box_set_spacing':
/home/hua/gtk+-2.8.20/gtk/gtkbox.c:489: undefined reference to `g_object_notify'
/usr/local/lib/libgtk-x11-2.0.a(gtkbox.o): In function `IA__gtk_box_set_homogeneous':
/home/hua/gtk+-2.8.20/gtk/gtkbox.c:458: undefined reference to `g_object_notify'
/usr/local/lib/libgtk-x11-2.0.a(gtkbox.o): In function `gtk_box_class_init':
/home/hua/gtk+-2.8.20/gtk/gtkbox.c:128: undefined reference to `g_object_class_install_property'
/home/hua/gtk+-2.8.20/gtk/gtkbox.c:138: undefined reference to `g_object_class_install_property'
/usr/local/lib/libgtk-x11-2.0.a(gtkbox.o): In function `gtk_box_get_child_property':
/home/hua/gtk+-2.8.20/gtk/gtkbox.c:357: undefined reference to `g_value_set_int'
/home/hua/gtk+-2.8.20/gtk/gtkbox.c:335: undefined reference to `g_value_set_boolean'
/home/hua/gtk+-2.8.20/gtk/gtkbox.c:344: undefined reference to `g_value_set_enum'
/home/hua/gtk+-2.8.20/gtk/gtkbox.c:341: undefined reference to `g_value_set_uint'
/home/hua/gtk+-2.8.20/gtk/gtkbox.c:338: undefined reference to `g_value_set_boolean'
/usr/local/lib/libgtk-x11-2.0.a(gtkcontainer.o): In function `IA__gtk_container_child_get_valist':
/home/hua/gtk+-2.8.20/gtk/gtkcontainer.c:362: undefined reference to `g_object_ref'
/home/hua/gtk+-2.8.20/gtk/gtkcontainer.c:363: undefined reference to `g_object_ref'
/home/hua/gtk+-2.8.20/gtk/gtkcontainer.c:372: undefined reference to `g_param_spec_pool_lookup'
/home/hua/gtk+-2.8.20/gtk/gtkcontainer.c:392: undefined reference to `g_value_init'
/home/hua/gtk+-2.8.20/gtk/gtkcontainer.c:402: undefined reference to `g_value_unset'
/home/hua/gtk+-2.8.20/gtk/gtkcontainer.c:406: undefined reference to `g_object_unref'
/home/hua/gtk+-2.8.20/gtk/gtkcontainer.c:407: undefined reference to `g_object_unref'
/home/hua/gtk+-2.8.20/gtk/gtkcontainer.c:399: undefined reference to `g_value_unset'
/usr/local/lib/libgtk-x11-2.0.a(gtkcontainer.o): In function `gtk_container_class_init':
/home/hua/gtk+-2.8.20/gtk/gtkcontainer.c:202: undefined reference to `g_object_class_install_property'
/home/hua/gtk+-2.8.20/gtk/gtkcontainer.c:210: undefined reference to `g_object_class_install_property'
/home/hua/gtk+-2.8.20/gtk/gtkcontainer.c:219: undefined reference to `g_object_class_install_property'
/usr/local/lib/libgtk-x11-2.0.a(gtkcontainer.o): In function `gtk_container_real_set_focus_child':
/home/hua/gtk+-2.8.20/gtk/gtkcontainer.c:1469: undefined reference to `g_object_unref'
/home/hua/gtk+-2.8.20/gtk/gtkcontainer.c:1472: undefined reference to `g_object_ref'
/home/hua/gtk+-2.8.20/gtk/gtkcontainer.c:1485: undefined reference to `g_object_get_qdata'
/home/hua/gtk+-2.8.20/gtk/gtkcontainer.c:1486: undefined reference to `g_object_get_qdata'
/usr/local/lib/libgtk-x11-2.0.a(gtkcontainer.o): In function `gtk_container_set_property':
/home/hua/gtk+-2.8.20/gtk/gtkcontainer.c:849: undefined reference to `g_value_get_enum'
/home/hua/gtk+-2.8.20/gtk/gtkcontainer.c:852: undefined reference to
................................大概有5000千多行.............
有人知道这是为什么吗?还缺什么库吗?我的静态库顺序错了吗?
|
有没有大牛指点下哈。。。。搬板凳学习中。。。。
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。