How do I turn DLIB_NO_GUI_SUPPORT off ?
I am trying to run imglab to put bounding boxes in my sample images.
I wrote the command: cmake --build . --config Release
I got an error: home/charul/dlib/dlib/../dlib/gui_widgets/../gui_core/gui_core_kernel_2.h:11:2: error: #error "DLIB_NO_GUI_SUPPORT is defined so you can't use the GUI code. Turn DLIB_NO_GUI_SUPPORT off if you want to use it."
#error "DLIB_NO_GUI_SUPPORT is defined so you can't use the GUI code. Turn DLI
^
/home/charul/dlib/dlib/../dlib/gui_widgets/../gui_core/gui_core_kernel_2.h:12:2: error: #error "Also make sure you have libx11-dev installed on your system"
#error "Also make sure you have libx11-dev installed on your system"
While I understand the error, I dont understand how to turn off DLIB_NO_GUI_SUPPORT and from which module?
Thanks
Apparently you don't have X11 installed.
charul@ubuntu:~/dlib/tools/imglab/build$ sudo apt-get update && sudo apt-get install libx11-dev
[sudo] password for charul:
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Hit:2 http://us.archive.ubuntu.com/ubuntu xenial InRelease
Get:3 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:4 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [181 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Get:6 http://security.ubuntu.com/ubuntu xenial-security/main i386 Packages [176 kB]
Get:7 http://security.ubuntu.com/ubuntu xenial-security/main Translation-en [73.3 kB]
Get:8 http://security.ubuntu.com/ubuntu xenial-security/main amd64 DEP-11 Metadata [68.2 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [429 kB]
Get:10 http://security.ubuntu.com/ubuntu xenial-security/main DEP-11 64x64 Icons [47.6 kB]
Get:11 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [64.0 kB]
Get:12 http://security.ubuntu.com/ubuntu xenial-security/universe i386 Packages [61.8 kB]
Get:13 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 DEP-11 Metadata [19.4 kB]
Get:14 http://security.ubuntu.com/ubuntu xenial-security/universe DEP-11 64x64 Icons [25.6 kB]
Get:15 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 DEP-11 Metadata [208 B]
Get:16 http://us.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages [423 kB]
Get:17 http://us.archive.ubuntu.com/ubuntu xenial-updates/main Translation-en [166 kB]
Get:18 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 DEP-11 Metadata [293 kB]
Get:19 http://us.archive.ubuntu.com/ubuntu xenial-updates/main DEP-11 64x64 Icons [186 kB]
Get:20 http://us.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [366 kB]
Get:21 http://us.archive.ubuntu.com/ubuntu xenial-updates/universe i386 Packages [362 kB]
Get:22 http://us.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 DEP-11 Metadata [121 kB]
Get:23 http://us.archive.ubuntu.com/ubuntu xenial-updates/universe DEP-11 64x64 Icons [145 kB]
Get:24 http://us.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 DEP-11 Metadata [2,516 B]
Get:25 http://us.archive.ubuntu.com/ubuntu xenial-backports/main amd64 DEP-11 Metadata [208 B]
Get:26 http://us.archive.ubuntu.com/ubuntu xenial-backports/universe amd64 DEP-11 Metadata [212 B]
Get:27 http://us.archive.ubuntu.com/ubuntu xenial-backports/multiverse amd64 DEP-11 Metadata [212 B]
Fetched 3,517 kB in 14s (248 kB/s)
AppStream cache update completed, but some metadata was ignored due to errors.
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libpthread-stubs0-dev libx11-doc libxau-dev libxcb1-dev libxdmcp-dev x11proto-core-dev x11proto-input-dev x11proto-kb-dev xorg-sgml-doctools xtrans-dev
Suggested packages:
libxcb-doc
The following NEW packages will be installed:
libpthread-stubs0-dev libx11-dev libx11-doc libxau-dev libxcb1-dev libxdmcp-dev x11proto-core-dev x11proto-input-dev x11proto-kb-dev xorg-sgml-doctools xtrans-dev
0 upgraded, 11 newly installed, 0 to remove and 204 not upgraded.
Need to get 2,900 kB of archives.
After this operation, 16.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libpthread-stubs0-dev amd64 0.3-4 [4,068 B]
Get:2 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 xorg-sgml-doctools all 1:1.11-1 [12.9 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 x11proto-core-dev all 7.0.28-2ubuntu1 [254 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libxau-dev amd64 1:1.0.8-1 [11.1 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libxdmcp-dev amd64 1:1.1.2-1.1 [25.1 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 x11proto-input-dev all 2.3.1-1 [118 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 x11proto-kb-dev all 1.0.7-0ubuntu1 [224 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 xtrans-dev all 1.3.5-1 [70.5 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libxcb1-dev amd64 1.11.1-1ubuntu1 [74.2 kB]
Get:10 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libx11-dev amd64 2:1.6.3-1ubuntu2 [642 kB]
Get:11 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libx11-doc all 2:1.6.3-1ubuntu2 [1,465 kB]
Fetched 2,900 kB in 11s (250 kB/s)
Selecting previously unselected package libpthread-stubs0-dev:amd64.
(Reading database ... 229255 files and directories currently installed.)
Preparing to unpack .../libpthread-stubs0-dev_0.3-4_amd64.deb ...
Unpacking libpthread-stubs0-dev:amd64 (0.3-4) ...
Selecting previously unselected package xorg-sgml-doctools.
Preparing to unpack .../xorg-sgml-doctools_1%3a1.11-1_all.deb ...
Unpacking xorg-sgml-doctools (1:1.11-1) ...
Selecting previously unselected package x11proto-core-dev.
Preparing to unpack .../x11proto-core-dev_7.0.28-2ubuntu1_all.deb ...
Unpacking x11proto-core-dev (7.0.28-2ubuntu1) ...
Selecting previously unselected package libxau-dev:amd64.
Preparing to unpack .../libxau-dev_1%3a1.0.8-1_amd64.deb ...
Unpacking libxau-dev:amd64 (1:1.0.8-1) ...
Selecting previously unselected package libxdmcp-dev:amd64.
Preparing to unpack .../libxdmcp-dev_1%3a1.1.2-1.1_amd64.deb ...
Unpacking libxdmcp-dev:amd64 (1:1.1.2-1.1) ...
Selecting previously unselected package x11proto-input-dev.
Preparing to unpack .../x11proto-input-dev_2.3.1-1_all.deb ...
Unpacking x11proto-input-dev (2.3.1-1) ...
Selecting previously unselected package x11proto-kb-dev.
Preparing to unpack .../x11proto-kb-dev_1.0.7-0ubuntu1_all.deb ...
Unpacking x11proto-kb-dev (1.0.7-0ubuntu1) ...
Selecting previously unselected package xtrans-dev.
Preparing to unpack .../xtrans-dev_1.3.5-1_all.deb ...
Unpacking xtrans-dev (1.3.5-1) ...
Selecting previously unselected package libxcb1-dev:amd64.
Preparing to unpack .../libxcb1-dev_1.11.1-1ubuntu1_amd64.deb ...
Unpacking libxcb1-dev:amd64 (1.11.1-1ubuntu1) ...
Selecting previously unselected package libx11-dev:amd64.
Preparing to unpack .../libx11-dev_2%3a1.6.3-1ubuntu2_amd64.deb ...
Unpacking libx11-dev:amd64 (2:1.6.3-1ubuntu2) ...
Selecting previously unselected package libx11-doc.
Preparing to unpack .../libx11-doc_2%3a1.6.3-1ubuntu2_all.deb ...
Unpacking libx11-doc (2:1.6.3-1ubuntu2) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up libpthread-stubs0-dev:amd64 (0.3-4) ...
Setting up xorg-sgml-doctools (1:1.11-1) ...
Setting up x11proto-core-dev (7.0.28-2ubuntu1) ...
Setting up libxau-dev:amd64 (1:1.0.8-1) ...
Setting up libxdmcp-dev:amd64 (1:1.1.2-1.1) ...
Setting up x11proto-input-dev (2.3.1-1) ...
Setting up x11proto-kb-dev (1.0.7-0ubuntu1) ...
Setting up xtrans-dev (1.3.5-1) ...
Setting up libxcb1-dev:amd64 (1.11.1-1ubuntu1) ...
Setting up libx11-dev:amd64 (2:1.6.3-1ubuntu2) ...
Setting up libx11-doc (2:1.6.3-1ubuntu2) ...
charul@ubuntu:~/dlib/tools/imglab/build$ cmake --build . --config Release
[ 94%] Built target dlib
[ 94%] Building CXX object CMakeFiles/imglab.dir/src/main.cpp.o
In file included from /home/charul/dlib/dlib/../dlib/gui_widgets/../gui_core/xlib.h:4:0,
from /home/charul/dlib/dlib/../dlib/gui_widgets/../gui_core.h:14,
from /home/charul/dlib/dlib/../dlib/gui_widgets/drawable.h:8,
from /home/charul/dlib/dlib/../dlib/gui_widgets/widgets.h:9,
from /home/charul/dlib/dlib/../dlib/gui_widgets.h:13,
from /home/charul/dlib/tools/imglab/src/metadata_editor.h:6,
from /home/charul/dlib/tools/imglab/src/main.cpp:4:
/home/charul/dlib/dlib/../dlib/gui_widgets/../gui_core/gui_core_kernel_2.h:11:2: error: #error "DLIB_NO_GUI_SUPPORT is defined so you can't use the GUI code. Turn DLIB_NO_GUI_SUPPORT off if you want to use it."
#error "DLIB_NO_GUI_SUPPORT is defined so you can't use the GUI code. Turn DLIB_NO_GUI_SUPPORT off if you want to use it."
^
/home/charul/dlib/dlib/../dlib/gui_widgets/../gui_core/gui_core_kernel_2.h:12:2: error: #error "Also make sure you have libx11-dev installed on your system"
#error "Also make sure you have libx11-dev installed on your system"
^
CMakeFiles/imglab.dir/build.make:62: recipe for target 'CMakeFiles/imglab.dir/src/main.cpp.o' failed
make[2]: * [CMakeFiles/imglab.dir/src/main.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/imglab.dir/all' failed
make[1]: [CMakeFiles/imglab.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: ** [all] Error 2
I installed x11 as displayed in the log, however I am still getting the same error. How do I work through this?
Also I am trying to run this on ubuntu.
Delete your build folder and do it from scratch.
Most helpful comment
Delete your build folder and do it from scratch.