Thank you for making dlib! I'm using Qt 5.2.0 on Ubuntu 13.10, and I'm using a Qt GUI template which uses the "QtGui/QGuiApplication" header. I want to do a test run of dlib by running the first few lines of http://dlib.net/matrix_ex.cpp.html . I have included "dlib/all/source.cpp" in my project, and the dlib directory is in the include path of the project qmake file.
I got the following errors:
error: source.o: undefined reference to symbol 'XConvertSelection'
/usr/lib/x86_64-linux-gnu/libX11.so.6:-1: error: error adding symbols: DSO missing from command line
error: collect2: error: ld returned 1 exit status
I suspect the Qt GUI libraries and the X11 aren't playing nice. May you please assist me?
Another thing; I just need the the non-GUI portion of dlib -- is there a way to specify that so I don't have ot use X11?
Cheers,
Roy
Edit: I solved the compile issue by expliciting stating X11 should be used; this solution was adapted from here here. I'm not sure if this is a Ubuntu thing or a Qt issue. I added the following lines to my qt project file.
CONFIG += link_pkgconfig
PKGCONFIG += x11
I still wonder if I can use the non-GUI portions of dlib to save time during compiling?
Last edit: Anonymous 2013-12-23
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
To make that linker error go away you can either link with X11 by giving
gcc the -lX11 option (it will not interfere with Qt) or you can tell dlib
to not use X11 at all by giving gcc the compiler option
-DDLIB_NO_GUI_SUPPORT.
Hi Davis,
Thank you for making dlib! I'm using Qt 5.2.0 on Ubuntu 13.10, and I'm using a Qt GUI template which uses the "QtGui/QGuiApplication" header. I want to do a test run of dlib by running the first few lines of http://dlib.net/matrix_ex.cpp.html . I have included "dlib/all/source.cpp" in my project, and the dlib directory is in the include path of the project qmake file.
I got the following errors:
I suspect the Qt GUI libraries and the X11 aren't playing nice.
May you please assist me?Another thing; I just need the the non-GUI portion of dlib -- is there a way to specify that so I don't have ot use X11?
Cheers,
Roy
Edit: I solved the compile issue by expliciting stating X11 should be used; this solution was adapted from here here. I'm not sure if this is a Ubuntu thing or a Qt issue. I added the following lines to my qt project file.
I still wonder if I can use the non-GUI portions of dlib to save time during compiling?
Last edit: Anonymous 2013-12-23
Thanks, I'm glad you like it so far :)
To make that linker error go away you can either link with X11 by giving
gcc the -lX11 option (it will not interfere with Qt) or you can tell dlib
to not use X11 at all by giving gcc the compiler option
-DDLIB_NO_GUI_SUPPORT.
Cheers,
Davis
Thanks, I just verified the -DDLIB_NO_GUI_SUPPORT option also works.
Regards,
Roy