【ubuntu-qt-dlib】 配置問題 (一) undefined reference to `XPending'

問題描述:undefined reference to `XPending'

source.o: In function `dlib::gui_core_kernel_2_globals::event_handler_thread::event_handler()':

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:639: undefined reference to `XPending'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:649: undefined reference to `XNextEvent'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:653: undefined reference to `XFilterEvent'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:679: undefined reference to `XInternAtom'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:692: undefined reference to `XChangeProperty'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:704: undefined reference to `XChangeProperty'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:717: undefined reference to `XSendEvent'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:718: undefined reference to `XFlush'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:731: undefined reference to `XAllocSizeHints'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:737: undefined reference to `XSetNormalHints'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:738: undefined reference to `XFree'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:745: undefined reference to `XResizeWindow'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:752: undefined reference to `XMoveWindow'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:756: undefined reference to `XFlush'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:794: undefined reference to `XwcLookupString'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:797: undefined reference to `XwcLookupString'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:804: undefined reference to `XLookupString'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1018: undefined reference to `XDestroyWindow'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1050: undefined reference to `XCheckIfEvent'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1223: undefined reference to `XInitImage'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1225: undefined reference to `XCreateGC'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1227: undefined reference to `XPutImage'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1229: undefined reference to `XFreeGC'

source.o: In function `dlib::gui_core_kernel_2_globals::event_handler_thread::init_keyboard_mod_masks()':

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1266: undefined reference to `XGetModifierMapping'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1272: undefined reference to `XkbKeycodeToKeysym'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1294: undefined reference to `XFreeModifiermap'

source.o: In function `dlib::put_on_clipboard(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&)':

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1365: undefined reference to `XSetSelectionOwner'

source.o: In function `dlib::get_from_clipboard(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >&)':

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1423: undefined reference to `XInternAtom'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1424: undefined reference to `XGetSelectionOwner'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1437: undefined reference to `XConvertSelection'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1441: undefined reference to `XPeekIfEvent'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1452: undefined reference to `XGetWindowProperty'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1455: undefined reference to `XFree'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1464: undefined reference to `XGetWindowProperty'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1468: undefined reference to `XwcTextPropertyToTextList'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1473: undefined reference to `XwcFreeStringList'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1482: undefined reference to `XFree'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1485: undefined reference to `XwcFreeStringList'

source.o: In function `dlib::base_window::base_window(bool, bool)':

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1593: undefined reference to `XCreateWindow'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1620: undefined reference to `XCreateFontSet'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1623: undefined reference to `XVaCreateNestedList'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1624: undefined reference to `XCreateIC'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1631: undefined reference to `XFree'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1632: undefined reference to `XFreeStringList'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1642: undefined reference to `XGetICValues'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1650: undefined reference to `XSelectInput'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1657: undefined reference to `XSetWMProtocols'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1668: undefined reference to `XAllocSizeHints'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1674: undefined reference to `XSetNormalHints'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1675: undefined reference to `XFree'

source.o: In function `dlib::base_window::~base_window()':

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1690: undefined reference to `XDestroyIC'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1692: undefined reference to `XFreeFontSet'

source.o: In function `dlib::base_window::close_window()':

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1712: undefined reference to `XDestroyWindow'

source.o: In function `dlib::base_window::set_title(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&)':

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1760: undefined reference to `XwcTextListToTextProperty'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1761: undefined reference to `XSetWMName'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1762: undefined reference to `XFree'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1763: undefined reference to `XFlush'

source.o: In function `dlib::base_window::show()':

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1777: undefined reference to `XMapRaised'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1778: undefined reference to `XFlush'

source.o: In function `dlib::base_window::hide()':

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1804: undefined reference to `XUnmapWindow'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1805: undefined reference to `XFlush'

source.o: In function `dlib::base_window::set_size(int, int)':

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1834: undefined reference to `XAllocSizeHints'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1840: undefined reference to `XSetNormalHints'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1841: undefined reference to `XFree'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1844: undefined reference to `XResizeWindow'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1846: undefined reference to `XFlush'

source.o: In function `dlib::base_window::set_pos(long, long)':

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1868: undefined reference to `XMoveWindow'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1869: undefined reference to `XFlush'

source.o: In function `dlib::base_window::get_pos(long&, long&)':

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1893: undefined reference to `XTranslateCoordinates'

source.o: In function `dlib::base_window::get_display_size(unsigned long&, unsigned long&) const':

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1934: undefined reference to `XScreenNumberOfScreen'

source.o: In function `dlib::base_window::invalidate_rectangle(dlib::rectangle const&)':

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1958: undefined reference to `XClearArea'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1959: undefined reference to `XFlush'

source.o: In function `dlib::base_window::set_im_pos(long, long)':

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1984: undefined reference to `XVaCreateNestedList'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1985: undefined reference to `XSetICValues'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:1986: undefined reference to `XFree'

source.o: In function `nativefont::font_renderer::font_renderer::vals_internal::rgb2color(nativefont::font_renderer::font_renderer::rgb_type, _XDisplay*, unsigned long&)':

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_widgets/nativefont.h:313: undefined reference to `XAllocColor'

source.o: In function `nativefont::font_renderer::font_renderer::vals_internal::color2rgb(unsigned long, _XDisplay*, unsigned long&)':

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_widgets/nativefont.h:435: undefined reference to `XQueryColor'

source.o: In function `nativefont::font_renderer::font_renderer::vals_internal::~vals_internal()':

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_widgets/nativefont.h:449: undefined reference to `XFreeGC'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_widgets/nativefont.h:450: undefined reference to `XFreeFontSet'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_widgets/nativefont.h:451: undefined reference to `XFreePixmap'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_widgets/nativefont.h:452: undefined reference to `XCloseDisplay'

source.o: In function `dlib::gui_core_kernel_2_globals::event_handler_thread::~event_handler_thread()':

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:147: undefined reference to `XFlush'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:148: undefined reference to `XPutBackEvent'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:149: undefined reference to `XFlush'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:153: undefined reference to `XSendEvent'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:154: undefined reference to `XFlush'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:160: undefined reference to `XCloseIM'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:163: undefined reference to `XCloseDisplay'

source.o: In function `dlib::gui_core_kernel_2_globals::event_handler_thread::thread()':

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:191: undefined reference to `XInitThreads'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:203: undefined reference to `XOpenDisplay'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:208: undefined reference to `XOpenDisplay'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:225: undefined reference to `XInternAtom'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:252: undefined reference to `XGetIMValues'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:265: undefined reference to `XFree'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_core/gui_core_kernel_2.cpp:272: undefined reference to `XCreateWindow'

source.o: In function `void nativefont::font_renderer::font_renderer::vals_internal::create<unsigned int>(unsigned int*, int, bool, bool, bool, nativefont::font_renderer::font_renderer::rgb_type, nativefont::font_renderer::font_renderer::rgb_type)::inner::XTextExtents(_XOC*, wchar_t*, int, XRectangle*, XRectangle*)':

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_widgets/nativefont.h:322: undefined reference to `XwcTextExtents'

source.o: In function `void nativefont::font_renderer::font_renderer::vals_internal::create<unsigned int>(unsigned int*, int, bool, bool, bool, nativefont::font_renderer::font_renderer::rgb_type, nativefont::font_renderer::font_renderer::rgb_type)::inner::XDrawString(_XDisplay*, unsigned long, _XOC*, _XGC*, int, int, wchar_t*, int)':

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_widgets/nativefont.h:328: undefined reference to `XwcDrawString'

source.o: In function `void nativefont::font_renderer::font_renderer::vals_internal::create<unsigned int>(unsigned int*, int, bool, bool, bool, nativefont::font_renderer::font_renderer::rgb_type, nativefont::font_renderer::font_renderer::rgb_type)':

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_widgets/nativefont.h:334: undefined reference to `XOpenDisplay'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_widgets/nativefont.h:337: undefined reference to `XOpenDisplay'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_widgets/nativefont.h:369: undefined reference to `XFreeFontSet'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_widgets/nativefont.h:371: undefined reference to `XCreateFontSet'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_widgets/nativefont.h:376: undefined reference to `XExtentsOfFontSet'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_widgets/nativefont.h:379: undefined reference to `XFreeStringList'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_widgets/nativefont.h:388: undefined reference to `XFreeGC'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_widgets/nativefont.h:389: undefined reference to `XFreePixmap'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_widgets/nativefont.h:393: undefined reference to `XDefaultDepth'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_widgets/nativefont.h:393: undefined reference to `XCreatePixmap'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_widgets/nativefont.h:394: undefined reference to `XCreateGC'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_widgets/nativefont.h:398: undefined reference to `XSetForeground'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_widgets/nativefont.h:399: undefined reference to `XSetBackground'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_widgets/nativefont.h:400: undefined reference to `XFillRectangle'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_widgets/nativefont.h:401: undefined reference to `XSetForeground'

/home/ubuntu/face-recognition/face_detector/cpp/build-m_landmark_ex2-unknown-Debug/../../../dlib/dlib/all/../gui_widgets/nativefont.h:405: undefined reference to `XGetImage'

collect2: error: ld returned 1 exit status

make: *** [m_landmark_ex2] Error 1

解決辦法:這裏在於x11沒有配置好造成。配置參考鏈接【1】


參考鏈接

【1】Qt Creator 下使用Dlib
【2】使用Dlib編程出現X11相關錯誤
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章