g++ doesn't detect that a file exists, and won't link it

420 Views Asked by At

I downloaded the Dlib example for face detection:http://dlib.net/face_detection_ex.cpp.html

and only changed three lines, for where my libraries are:

Before:

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

using namespace dlib;
using namespace std;

After:

#include <~/dlib/image_processing/frontal_face_detector.h>
#include <~/dlib/gui_widgets.h>
#include <~/dlib/image_io.h>
#include <iostream>

using namespace dlib;
using namespace std;

And yet for some reason, g++ can't find them:

$ g++ face_detection_ex.cpp -o face_detection_ex
face_detection_ex.cpp:40:59: fatal error: ~/dlib/image_processing/frontal_face_detector.h: No such file or directory
 #include <~/dlib/image_processing/frontal_face_detector.h>
                                                       ^
compilation terminated.

Despite all of the libraries being in that folder:

[me]@[me]-Dell-ProBook-6760g:~$ cat  ~/dlib/image_processing/frontal_face_detector.h
// Copyright (C) 2013  Davis E. King ([email protected])
// License: Boost Software License   See LICENSE.txt for the full license.
#ifndef DLIB_FRONTAL_FACE_DETECTOr_Hh_
#define DLIB_FRONTAL_FACE_DETECTOr_Hh_

#include "frontal_face_detector_abstract.h"
#include "../image_processing/object_detector.h"
#include "../image_processing/scan_fhog_pyramid.h"
#include <sstream>
#include "../compress_stream.h"
#include "../base64.h"

namespace dlib

Why won't this work? What am I doing wrong here?

0

There are 0 best solutions below