【问题标题】:How to link X11 to qt project on MacOS High Sierra如何在 MacOS High Sierra 上将 X11 链接到 qt 项目
【发布时间】:2019-01-20 03:10:28
【问题描述】:

我尝试使用 dlib 编译 Qt 项目

#include <dlib/image_processing/frontal_face_detector.h>
#include <dlib/dnn.h>
#include <dlib/gui_widgets.h>
#include <dlib/clustering.h>
#include <dlib/string.h>
#include <dlib/image_io.h>
#include <iostream>

using namespace cv;
using namespace dlib;
using namespace std;

int main(int argc, char *argv[])
{
    frontal_face_detector detector = get_frontal_face_detector();
    matrix <rgb_pixel> image;
    load_image(image, "/Users/ivanlebedev/Desktop/Projects/ManSearch/cars/2.jpg");
    image_window win(image);
}

但我有这个错误:

/usr/local/Cellar/dlib/19.15/include/dlib/gui_core/gui_core_kernel_2.h:12: ошибка: "Also make sure you have libx11-dev installed on your system"
#error "Also make sure you have libx11-dev installed on your system"
 ^

我怎样才能让我的程序工作?

【问题讨论】:

    标签: c++ macos qt x11 dlib


    【解决方案1】:

    您不需要也不想要 x11-任何东西。你需要在不支持x11的情况下编译dlib,然后它就可以正常工作了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-07-16
      • 2018-12-05
      • 2023-03-15
      • 2018-12-08
      • 1970-01-01
      • 2018-10-19
      • 2018-11-03
      • 2020-07-13
      相关资源
      最近更新 更多